Set up Database Cleaner for Geo database

parent c3b9b439
RSpec.configure do |config|
config.before(:suite) do
setup_database_cleaner
DatabaseCleaner.clean_with(:truncation)
end
......@@ -8,6 +9,7 @@ RSpec.configure do |config|
end
config.before(:each) do
setup_database_cleaner
DatabaseCleaner.strategy = :transaction
end
......@@ -26,4 +28,9 @@ RSpec.configure do |config|
config.append_after(:each) do
DatabaseCleaner.clean
end
def setup_database_cleaner
DatabaseCleaner[:active_record, { connection: Geo::BaseRegistry }]
DatabaseCleaner[:active_record, { connection: ActiveRecord::Base }]
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment