Merge pull request #1246 from Ana06/db_cleaning
Improvements in the DatabaseCleaner
This commit is contained in:
commit
4a75546e6c
2 changed files with 2 additions and 16 deletions
|
|
@ -55,13 +55,6 @@ RSpec.configure do |config|
|
|||
# --seed 1234
|
||||
config.order = 'random'
|
||||
|
||||
config.around(:each) do |example|
|
||||
DatabaseCleaner.cleaning do
|
||||
Rails.application.load_seed
|
||||
example.run
|
||||
end
|
||||
end
|
||||
|
||||
# poltergeist as a underlying mech for Capybara
|
||||
Capybara.javascript_driver = :poltergeist
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,6 @@
|
|||
RSpec.configure do |config|
|
||||
config.before(:suite) do
|
||||
DatabaseCleaner.clean_with(:truncation)
|
||||
end
|
||||
|
||||
config.before(:each) do
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
end
|
||||
|
||||
config.before(:each, js: true) do
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
DatabaseCleaner.clean_with(:truncation)
|
||||
Rails.application.load_seed
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue