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
|
|
|
|
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
|
|
|
|
|
|
|
|
config.before(:each) do
|
|
|
|
DatabaseCleaner.start
|
|
|
|
end
|
|
|
|
|
|
|
|
config.after(:each) do
|
|
|
|
DatabaseCleaner.clean
|
2012-08-23 05:19:40 -04:00
|
|
|
end
|
|
|
|
end
|