-
Notifications
You must be signed in to change notification settings - Fork 1
Not cleaning collections in other Mongo sessions #2
Open
Description
Not sure if this is fixable, but we have a supporting rails app, that looks for its data in a main's app db.
So some models have this code:
class User
store_in collection: 'users', session: 'main_app'
...
These collections are not cleaned by DatabseCleaner. To fix this we need to use:
config.after(:each) do
DatabaseCleaner[:mongoid].clean
Mongoid.session('main_app').collections.each do |collection|
collection.drop
end
end
Metadata
Metadata
Assignees
Labels
No labels
Type
Fields
Give feedbackNo fields configured for issues without a type.