specs: fix random seed being always the same when using Spring
This commit is contained in:
parent
db5f9703f6
commit
1eb110ac7c
1 changed files with 3 additions and 0 deletions
|
@ -118,6 +118,9 @@ RSpec.configure do |config|
|
|||
config.filter_run :focus => true
|
||||
|
||||
config.order = 'random'
|
||||
# Fix the seed not changing between runs when using Spring
|
||||
# See https://github.com/rails/spring/issues/113
|
||||
config.seed = srand % 0xFFFF unless ARGV.any? { |arg| arg =~ /seed/ || arg =~ /rand:/ }
|
||||
|
||||
config.include Devise::Test::ControllerHelpers, type: :controller
|
||||
config.include Devise::Test::ControllerHelpers, type: :view
|
||||
|
|
Loading…
Reference in a new issue