Sha256: 784154467fdb415ae7818f48eef2c9a29c9bc0dd3d29cbc8dc25e239f519e84b

Contents?: true

Size: 526 Bytes

Versions: 4

Compression:

Stored size: 526 Bytes

Contents

DatabaseCleaner[:active_record].strategy = :transaction if defined? ActiveRecord
DatabaseCleaner[:data_mapper].strategy = :transaction if defined? DataMapper
DatabaseCleaner[:mongoid].strategy = :truncation if defined? Mongoid
DatabaseCleaner[:mongo_mapper].strategy = :truncation if defined? MongoMapper

RSpec.configure do |config|
  config.before :suite do
    DatabaseCleaner.clean_with :truncation
  end
  config.before :each do
    DatabaseCleaner.start
  end
  config.after :each do
    DatabaseCleaner.clean
  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
kaminari-rails4-0.15.0 spec/support/database_cleaner.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/kaminari-0.14.1/spec/support/database_cleaner.rb
kaminari-0.14.1 spec/support/database_cleaner.rb
kaminari-0.14.0 spec/support/database_cleaner.rb