Sha256: ff69c447a48c0c95fc5fe12635bc5411f3b16298620a3448c62e4609f8eb6c06
Contents?: true
Size: 1.04 KB
Versions: 12
Compression:
Stored size: 1.04 KB
Contents
require "database_cleaner" require "support/migration_helpers" RSpec.configure do |config| config.include MigrationHelpers, migration: true, data_migration: true config.before(:suite) do if defined?(::DB) DatabaseCleaner.strategy = :transaction PactBroker::Database.truncate end end config.before :each, migration: true do PactBroker::Database.drop_objects end config.after :each, migration: true do PactBroker::Database.migrate PactBroker::Database.truncate end config.after :each, data_migration: true do PactBroker::Database.truncate end config.after :all, data_migration: true do PactBroker::Database.migrate PactBroker::Database.truncate end config.before(:each) do | example | unless example.metadata[:no_db_clean] || example.metadata[:migration] DatabaseCleaner.start if defined?(::DB) end end config.after(:each) do | example | unless example.metadata[:no_db_clean] || example.metadata[:migration] DatabaseCleaner.clean if defined?(::DB) end end end
Version data entries
12 entries across 12 versions & 1 rubygems