2012-08-23 05:19:40 -04:00
|
|
|
RSpec.configure do |config|
|
2014-05-08 13:15:58 -04:00
|
|
|
config.around(:each) do
|
|
|
|
DatabaseCleaner.clean_with(:truncation)
|
|
|
|
end
|
|
|
|
|
|
|
|
config.around(:each) do
|
|
|
|
DatabaseCleaner.strategy = :transaction
|
|
|
|
end
|
|
|
|
|
|
|
|
config.around(:each, js: true) do
|
|
|
|
DatabaseCleaner.strategy = :truncation
|
|
|
|
end
|
2012-08-23 05:19:40 -04:00
|
|
|
|
2014-05-08 13:15:58 -04:00
|
|
|
config.before(:each) do
|
|
|
|
DatabaseCleaner.start
|
2012-08-23 05:19:40 -04:00
|
|
|
end
|
|
|
|
|
2014-05-08 13:15:58 -04:00
|
|
|
config.after(:each) do
|
|
|
|
DatabaseCleaner.clean
|
2012-08-23 05:19:40 -04:00
|
|
|
end
|
|
|
|
end
|