Created
January 15, 2018 22:46
-
-
Save dougjohnston/68f1ac9eec1cefc4923ecb9529f2c5ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
config.before(:suite) do | |
raise 'Don\'t use transactional fixtures!' if config.use_transactional_fixtures? | |
puts 'Making sure the portal schema is loaded and accessible' | |
Rails.application.load_tasks | |
Rake::Task['db:test:load_portal'].invoke | |
DatabaseCleaner.clean_with(:truncation) | |
end | |
config.before(:each) do | |
DatabaseCleaner.strategy = :transaction | |
end | |
config.before(:each, js: true) do | |
DatabaseCleaner.strategy = :truncation, { except: %w[room_types promotion_types] } | |
DatabaseCleaner.clean | |
end | |
config.before(:each) do | |
DatabaseCleaner.start | |
end | |
config.append_after(:each) do | |
DatabaseCleaner.clean | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment