config.use_transactional_fixtures = false | |
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 | |
end | |
config.before(:each) do | |
DatabaseCleaner.start | |
end | |
# Force the driver to wait till the page finishes loading | |
config.after(:each, js: true) do | |
current_path.should == current_path | |
end | |
config.after(:each) do | |
DatabaseCleaner.clean | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
BTW, @jnicklas also suggests using an
:around
block for database cleaning. teamcapybara/capybara#1089 (comment)