mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-24 17:54:59 -04:00
24 lines
446 B
Ruby
24 lines
446 B
Ruby
RSpec.configure do |config|
|
|
|
|
config.before(:suite) do
|
|
DatabaseCleaner.clean_with(:truncation)
|
|
end
|
|
|
|
config.before(:each) do
|
|
DatabaseCleaner.strategy = :transaction
|
|
end
|
|
|
|
config.before(:each, :js => true) do
|
|
DatabaseCleaner.strategy = :truncation
|
|
end
|
|
|
|
config.before(:each) do
|
|
DatabaseCleaner.start
|
|
Crop.__elasticsearch__.create_index! force: true
|
|
end
|
|
|
|
config.after(:each) do
|
|
DatabaseCleaner.clean
|
|
end
|
|
|
|
end |