Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mongodb capped collection #7

Open
asosa opened this issue Feb 15, 2012 · 2 comments
Open

mongodb capped collection #7

asosa opened this issue Feb 15, 2012 · 2 comments

Comments

@asosa
Copy link

asosa commented Feb 15, 2012

Hi

I'm using mongoid and having capped collection. Then, my capped collection doesn't seem to be cleared.
Here is my code example.

# spec/spec_helper.rb
config.before(:suite) do
  DatabaseCleaner.strategy = :truncation
  DatabaseCleaner.orm = "mongoid"
end

config.before(:each) do
  DatabaseCleaner.clean
end

# app/models/my_capped
class Capped
  include Mongoid::Document
  include Mongoid::Timestamps

  store_in :my_capped, capped: true, size: 500.megabytes

  field :count, type: Integer, default: 0
end
@fbjork
Copy link

fbjork commented Apr 27, 2012

Also having this issue. Capped collections need to be dropped instead of truncated. Anyone have a clean solution to this?

@rudolph9
Copy link

Yes, I'm running into the same issue.

@botandrose botandrose transferred this issue from DatabaseCleaner/database_cleaner Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants