1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00
kaminari--kaminari/spec/support/database_cleaner.rb
Zachary Scott 48fc4bd0f1 Drop support for MongoMapper.
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
2014-11-22 18:17:35 -08:00

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