Sha256: e20b068c88e22da527f69f466917d5874cc6a30cb4c930fcbfb52cdddbd53225
Contents?: true
Size: 495 Bytes
Versions: 11
Compression:
Stored size: 495 Bytes
Contents
require 'database_cleaner' RSpec.configure do |config| config.before(:suite) do if defined?(::DB) DatabaseCleaner.strategy = :transaction DatabaseCleaner.clean_with :truncation end end config.before(:each) do | example | unless example.metadata[:no_db_clean] DatabaseCleaner.start if defined?(::DB) end end config.after(:each) do | example | unless example.metadata[:no_db_clean] DatabaseCleaner.clean if defined?(::DB) end end end
Version data entries
11 entries across 11 versions & 1 rubygems