2018-05-07 16:47:29 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2014-05-10 15:55:17 +02:00
|
|
|
RSpec.configure do |config|
|
2017-06-14 02:46:39 +05:30
|
|
|
config.before(:suite) do
|
2018-11-16 11:57:51 -08:00
|
|
|
DatabaseCleaner.clean_with(:transaction)
|
2017-01-10 18:29:25 +01:00
|
|
|
Rails.application.load_seed
|
2014-05-10 15:55:17 +02:00
|
|
|
end
|
2017-06-14 02:46:39 +05:30
|
|
|
|
2018-11-16 11:57:51 -08:00
|
|
|
config.before(:each) do
|
2017-06-14 02:46:39 +05:30
|
|
|
DatabaseCleaner.start
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
config.after(:each) do |example|
|
2018-11-16 11:57:51 -08:00
|
|
|
TransactionalCapybara::AjaxHelpers.wait_for_ajax(page) if example.metadata[:js]
|
2017-06-14 02:46:39 +05:30
|
|
|
DatabaseCleaner.clean
|
|
|
|
|
end
|
2014-05-10 15:55:17 +02:00
|
|
|
end
|