Fix the Travis failures in rspec
This commit is contained in:
parent
7ebf44d1e4
commit
e4104ba2cd
1 changed files with 1 additions and 11 deletions
|
|
@ -1,16 +1,6 @@
|
||||||
RSpec.configure do |config|
|
RSpec.configure do |config|
|
||||||
config.before(:suite) do
|
config.before(:each) do
|
||||||
DatabaseCleaner.clean_with(:truncation)
|
DatabaseCleaner.clean_with(:truncation)
|
||||||
Rails.application.load_seed
|
Rails.application.load_seed
|
||||||
end
|
end
|
||||||
|
|
||||||
config.before(:each) do |example|
|
|
||||||
DatabaseCleaner.strategy = (example.metadata[:js] == true) ? :truncation : :transaction
|
|
||||||
DatabaseCleaner.start
|
|
||||||
end
|
|
||||||
|
|
||||||
config.after(:each) do |example|
|
|
||||||
DatabaseCleaner.clean
|
|
||||||
Rails.application.load_seed if example.metadata[:js] == true
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue