2014-06-05 14:21:28 -04:00
|
|
|
RSpec.configure do |config|
|
2014-06-07 04:09:56 -04:00
|
|
|
config.before(:suite) do
|
|
|
|
DatabaseCleaner.clean_with(:truncation)
|
|
|
|
end
|
2014-06-06 02:01:17 -04:00
|
|
|
|
2017-02-17 10:19:39 -05:00
|
|
|
config.append_after(:context) do
|
|
|
|
DatabaseCleaner.clean_with(:truncation)
|
|
|
|
end
|
|
|
|
|
2014-06-07 04:09:56 -04:00
|
|
|
config.before(:each) do
|
2014-06-06 02:01:17 -04:00
|
|
|
DatabaseCleaner.strategy = :transaction
|
|
|
|
end
|
|
|
|
|
2015-06-22 14:54:33 -04:00
|
|
|
config.before(:each, js: true) do
|
2014-06-06 02:01:17 -04:00
|
|
|
DatabaseCleaner.strategy = :truncation
|
2014-06-07 04:09:56 -04:00
|
|
|
end
|
|
|
|
|
2016-10-11 08:25:17 -04:00
|
|
|
config.before(:each, truncate: true) do
|
|
|
|
DatabaseCleaner.strategy = :truncation
|
|
|
|
end
|
|
|
|
|
2014-06-07 04:09:56 -04:00
|
|
|
config.before(:each) do
|
|
|
|
DatabaseCleaner.start
|
|
|
|
end
|
|
|
|
|
2016-09-04 12:59:00 -04:00
|
|
|
config.append_after(:each) do
|
2014-06-07 04:09:56 -04:00
|
|
|
DatabaseCleaner.clean
|
2012-08-23 05:19:40 -04:00
|
|
|
end
|
|
|
|
end
|