#380 √ awaiting-patch
seangeo

Added --loadby random

Reported by seangeo | April 15th, 2008 @ 05:35 PM | in No-Milestone-Assigned

The following GitHub commit add support for a --loadby random option that randomizes the order in which specs are run.

http://github.com/seangeo/rspec/...

This is my first patch submitted through git, let me know if anything is wrong with it.

Comments and changes to this ticket

  • David Chelimsky

    David Chelimsky April 16th, 2008 @ 05:04 AM

    • → Assigned user changed from “” to “David Chelimsky”
    • → Milestone changed from “No-Milestone-Assigned” to “1.1.4”
    • → State changed from “new” to “resolved”
  • David Chelimsky

    David Chelimsky April 16th, 2008 @ 02:51 PM

    • → State changed from “resolved” to “open”

    I had applied this, but some of my commits got lost. Re-opening this. I'll reapply the patch when we figure out what happened.

  • David Chelimsky

    David Chelimsky April 24th, 2008 @ 03:21 PM

    Hey Sean - looks like this only randomizes the file order. I'd think we'd want randomization of the examples as well - what do you think?

  • seangeo

    seangeo April 24th, 2008 @ 04:50 PM

    I found file order useful to detect dependencies between specs, mainly caused by fixtures in Rails. Randomizing examples would also be useful I guess. Would you want the randomizing of examples to be done across specs or within specs? Is across specs even possible? What happens to spec level things, like fixtures and befores/afters if we randomize examples across specs?

    I'd be happy to investigate this further but I'd need some pointers on where to start.

  • David Chelimsky

    David Chelimsky April 24th, 2008 @ 05:02 PM

    I think that randomizing examples across example groups would be more trouble than its worth. IMO, there are three levels:

    files

    groups within a file

    examples within a group

    That make sense?

  • Brian Takita

    Brian Takita May 26th, 2008 @ 03:23 AM

    I agree that randomizing Examples globably would be a lot of trouble. However randomizing the ExampleGroups and the Examples within an ExampleGroup wouldn't be too bad.

    The reason I bring this up is the NestedTextFormatter would output duplicate trees if the Examples were globally randomized.

  • David Chelimsky

    David Chelimsky May 27th, 2008 @ 07:45 AM

    • → Milestone changed from “1.1.4” to “1.1.5”
  • David Chelimsky

    David Chelimsky June 23rd, 2008 @ 10:59 AM

    • → Milestone changed from “1.1.5” to “No-Milestone-Assigned”

    Sean - this still in your radar?

  • David Chelimsky

    David Chelimsky June 23rd, 2008 @ 11:03 AM

    • → State changed from “open” to “awaiting-patch”
  • seangeo

    seangeo June 24th, 2008 @ 04:50 AM

    It is, I've just been pretty busy lately. I'll try and get to it this

    week, I should have some time.

Please Login or create a free account to add a new comment.

You can update this ticket by sending an email to from your email client. (help)

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Behaviour Driven Development for Ruby.

Shared Ticket Bins