Search code examples
rspecguard

rspec prints test not in default order


I'm using guard, so it's not convinient for me to run specific test from command line so I guessed that rspec will run all test in order as they ordered in the file, but rspec runs test like in this example:

# ./spec/requests/projects_spec.rb:90:...
# ./spec/requests/projects_spec.rb:99:...
# ./spec/requests/projects_spec.rb:105:...
# ./spec/requests/projects_spec.rb:115:...
# ./spec/requests/projects_spec.rb:55:...
# ./spec/requests/projects_spec.rb:61:...
# ./spec/requests/projects_spec.rb:68:...
# ./spec/requests/projects_spec.rb:75:...

I've added to .rspec file the line --order default but it didn't change anything.

The vesrion of rspec is 2.11.0

How to make rspec to print tests as they are declared in file?


Solution

  • Just comment out the line config.order in spec_helper.rb file.