Permalink
Browse files

Default to run specs in random order to catch order dependencies

* Some features still need to run in default order
  • Loading branch information...
1 parent 8d7cb3a commit ed03bda9950db03f65aeef10a05d2eebf657060a @sferik sferik committed with alindeman Feb 6, 2012
@@ -71,7 +71,7 @@ Feature: render_views
end
end
"""
- When I run `rspec spec --format documentation`
+ When I run `rspec spec --order default --format documentation`
Then the output should contain:
"""
WidgetsController
@@ -62,6 +62,7 @@ Feature: transactional examples
RSpec.configure do |c|
c.use_transactional_examples = false
+ c.order = "default"
end
describe Widget do
@@ -29,4 +29,10 @@
# automatically. This will be the default behavior in future versions of
# rspec-rails.
config.infer_base_class_for_anonymous_controllers = false
+
+ # Run specs in random order to surface order dependencies. If you find an
+ # order dependency and want to debug it, you can fix the order by providing
+ # the seed, which is printed after each run.
+ # --seed 1234
+ config.order = "random"
end

0 comments on commit ed03bda

Please sign in to comment.