Sha256: 5886c8a531b057d74c483071d94c1ffebdb3b4383e85d63a5d5c6c89ff8089e2

Contents?: true

Size: 455 Bytes

Versions: 19

Compression:

Stored size: 455 Bytes

Contents

require "database_cleaner"
require "rspec/rails"

RSpec.configure do |config|

  # stop wrapping each of test examples within a transaction
  config.use_transactional_fixtures = false

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

  config.before :each do
    DatabaseCleaner.strategy = :transaction
  end

  config.before :each do
    DatabaseCleaner.start
  end

  config.after :each do
    DatabaseCleaner.clean
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
uuids-1.3.0 spec/support/initializers/database_cleaner.rb
uuids-1.2.0 spec/support/initializers/database_cleaner.rb
okei-1.0.2 spec/support/initializers/database_cleaner.rb
uuids-1.1 spec/support/initializers/database_cleaner.rb
okei-1.0.1 spec/support/initializers/database_cleaner.rb
okei-1.0.0 spec/support/initializers/database_cleaner.rb
uuids-1.0.2 spec/support/initializers/database_cleaner.rb
corrector-0.1.0 spec/support/initializers/database_cleaner.rb
okei-1.0.0.pre.rc spec/support/initializers/database_cleaner.rb
corrector-0.0.3 spec/support/initializers/database_cleaner.rb
uuids-1.0.1 spec/support/initializers/database_cleaner.rb
uuids-1.0.0 spec/support/initializers/database_cleaner.rb
corrector-0.0.2 spec/support/initializers/database_cleaner.rb
corrector-0.0.1 spec/support/initializers/database_cleaner.rb
uuids-1.0.0.pre.rc1 spec/support/initializers/database_cleaner.rb
uuids-0.2.0 spec/support/initializers/database_cleaner.rb
uuids-0.1.0 spec/support/initializers/database_cleaner.rb
uuids-0.0.1 spec/support/initializers/database_cleaner.rb
okei-0.0.2 spec/support/initializers/database_cleaner.rb