mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00

This extension will be unsupported in Kaminari 1.x If you'd like to support it, please let us know by opening a ticket on https://github.com/amatsuda/kaminari/issues/new Conflicts: .travis.yml README.rdoc spec/fake_app/mongo_mapper/config.rb
15 lines
459 B
Ruby
15 lines
459 B
Ruby
DatabaseCleaner[:active_record].strategy = :transaction if defined? ActiveRecord
|
|
DatabaseCleaner[:mongoid].strategy = :truncation if defined? Mongoid
|
|
|
|
RSpec.configure do |config|
|
|
config.before :suite do
|
|
DatabaseCleaner.clean_with :truncation if defined? ActiveRecord
|
|
DatabaseCleaner.clean_with :truncation if defined? Mongoid
|
|
end
|
|
config.before :each do
|
|
DatabaseCleaner.start
|
|
end
|
|
config.after :each do
|
|
DatabaseCleaner.clean
|
|
end
|
|
end
|