Sha256: e03da75fe31d8b7412e6e12e22a6719f87ebb9676cf2a1198f85a6f8f502a097

Contents?: true

Size: 419 Bytes

Versions: 2

Compression:

Stored size: 419 Bytes

Contents

require 'database_cleaner'

RSpec.configure do |config|

  config.before :suite do
    DatabaseCleaner.clean_with :truncation
  end

  config.prepend_before(:each) do
    if RSpec.current_example.metadata[:js]
      DatabaseCleaner.strategy = :truncation
    else
      DatabaseCleaner.strategy = :transaction
    end
    DatabaseCleaner.start
  end

  config.append_after(:each) do
    DatabaseCleaner.clean
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_volume_pricing-0.2.1 spec/support/database_cleaner.rb
solidus_volume_pricing-0.1.1 spec/support/database_cleaner.rb