Sha256: fe6133017dd3d51d096a2066a008d9e61fd31d10d0a0965a34e8ce0254d45c22

Contents?: true

Size: 447 Bytes

Versions: 9

Compression:

Stored size: 447 Bytes

Contents

# frozen_string_literal: true

require "database_cleaner"

RSpec.configure do |config|
  config.use_transactional_fixtures = false

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

  config.before(:each) do |example|
    strategy = example.metadata[:js] ? :truncation : :transaction

    DatabaseCleaner.strategy = strategy
    DatabaseCleaner.start
  end

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

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
archangel-0.4.0 lib/archangel/testing_support/support/database_cleaner.rb
archangel-0.3.0 lib/archangel/testing_support/support/database_cleaner.rb
archangel-0.0.8 lib/archangel/testing_support/support/database_cleaner.rb
archangel-0.0.7 lib/archangel/testing_support/support/database_cleaner.rb
archangel-0.0.6 lib/archangel/testing_support/support/database_cleaner.rb
archangel-0.0.5 lib/archangel/testing_support/support/database_cleaner.rb
archangel-0.0.4 lib/archangel/testing_support/support/database_cleaner.rb
archangel-0.0.3 lib/archangel/testing_support/support/database_cleaner.rb
archangel-0.0.2 lib/archangel/testing_support/support/database_cleaner.rb