Skip to content

Commit

Permalink
Randomize spec execution
Browse files Browse the repository at this point in the history
So it can generate a seed for each test execution which can then
be used to by `rspec --bisect` to repro order dependent flaky specs.

This is one approach to identify the root cause for forem#5228

It appears this is failing because `current_user` is `nil` before this spec is
run.
  • Loading branch information
VegaFromLyra committed Jan 18, 2020
1 parent e5a6d75 commit b344483
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@

config.infer_spec_type_from_file_location!

config.order = :random

# Filter lines from Rails gems in backtraces.
config.filter_rails_from_backtrace!
# arbitrary gems may also be filtered via:
Expand Down

0 comments on commit b344483

Please sign in to comment.