Sha256: e04abfa5bceefcf0d65b9850958e7f760ec1ae0a0597c309b87d00af099a17e7

Contents?: true

Size: 746 Bytes

Versions: 14

Compression:

Stored size: 746 Bytes

Contents

DatabaseCleaner[:active_record].strategy = :transaction if defined? ActiveRecord
DatabaseCleaner[:data_mapper].strategy = :truncation 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 if defined? ActiveRecord
    DatabaseCleaner.clean_with :truncation if defined? DataMapper
    DatabaseCleaner.clean_with :truncation if defined? Mongoid
    DatabaseCleaner.clean_with :truncation if defined? MongoMapper
  end
  config.before :each do
    DatabaseCleaner.start
  end
  config.after :each do
    DatabaseCleaner.clean
  end
end

Version data entries

14 entries across 14 versions & 6 rubygems

Version Path
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/kaminari-0.17.0/spec/support/database_cleaner.rb
kaminari-0.17.0 spec/support/database_cleaner.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/kaminari-0.16.3/spec/support/database_cleaner.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/kaminari-0.16.3/spec/support/database_cleaner.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/kaminari-0.16.3/spec/support/database_cleaner.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/kaminari-0.16.3/spec/support/database_cleaner.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/kaminari-0.16.3/spec/support/database_cleaner.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/kaminari-0.16.3/spec/support/database_cleaner.rb
kaminari-0.16.3 spec/support/database_cleaner.rb
kaminari-0.16.2 spec/support/database_cleaner.rb
kaminari-0.16.1 spec/support/database_cleaner.rb
kaminari-0.16.0 spec/support/database_cleaner.rb
kaminari-0.15.1 spec/support/database_cleaner.rb
kaminari-0.15.0 spec/support/database_cleaner.rb