Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RSpec.configure do |config|
- config.use_transactional_fixtures = false
- # Use transactions by default
- config.before :each do
- DatabaseCleaner.strategy = :transaction
- end
- # For the javascript-enabled tests, switch to truncation, but *only on tables that were used*
- config.before :each, :js => true do
- DatabaseCleaner.strategy = :truncation, {:pre_count => true}
- end
- config.before :each do
- DatabaseCleaner.start
- end
- config.after :each do
- DatabaseCleaner.clean
- end
- end
Add Comment
Please, Sign In to add comment