2014-06-07 04:09:56 -04:00
|
|
|
# RSpec.configure do |config|
|
|
|
|
|
|
|
|
# config.around(:each) do |example|
|
|
|
|
# DatabaseCleaner.strategy = :transaction
|
|
|
|
# DatabaseCleaner.clean_with(:truncation)
|
|
|
|
# DatabaseCleaner.cleaning do
|
|
|
|
# example.run
|
|
|
|
# end
|
|
|
|
# end
|
|
|
|
|
|
|
|
# config.around(:each, js: true) do |example|
|
|
|
|
# DatabaseCleaner.strategy = :truncation
|
|
|
|
# DatabaseCleaner.clean_with(:truncation)
|
|
|
|
# DatabaseCleaner.cleaning do
|
|
|
|
# example.run
|
|
|
|
# end
|
|
|
|
# end
|
|
|
|
# end
|
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
|
|
|
|
|
2014-06-07 04:09:56 -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
|