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

Version Path
pact_broker-2.0.2 spec/support/database_cleaner.rb
pact_broker-2.0.1 spec/support/database_cleaner.rb
pact_broker-2.0.0 spec/support/database_cleaner.rb
pact_broker-2.0.0.beta.8 spec/support/database_cleaner.rb
pact_broker-2.0.0.beta.7 spec/support/database_cleaner.rb
pact_broker-2.0.0.beta.6 spec/support/database_cleaner.rb
pact_broker-2.0.0.beta.5 spec/support/database_cleaner.rb
pact_broker-2.0.0.beta.4 spec/support/database_cleaner.rb
pact_broker-2.0.0.beta.3 spec/support/database_cleaner.rb
pact_broker-2.0.0.beta.2 spec/support/database_cleaner.rb
pact_broker-2.0.0.beta.1 spec/support/database_cleaner.rb