mongoid-rspec
mongoid-rspec copied to clipboard
RSpec matchers and macros for Mongoid.
` HaveAssociationMatcher` doesn't support the `touch` method assertion? ``` Failure/Error: it { should belong_to(:some_association).touch(true) } NoMethodError: undefined method `touch' for # ```
Looks pretty quiet here and https://github.com/mongoid/mongoid-rspec/pull/223 didn't have much reaction. I can help get new maintainers if we don't hear from @rodrigopinto or @saumyamehta17. @davekrupinski and @javierav, interested in helping...
Would it be possible to make make a matcher to ensure that a given request is a [covered query](https://docs.mongodb.com/manual/core/query-optimization/#covered-query) ? We could take advantage of mongodb's explain feature to check...
Received the following message during a `bundle install`.... >NOTE: Gem::Specification#rubyforge_project= is deprecated with no replacement. It will be removed on or after 2019-12-01. Gem::Specification#rubyforge_project= called from /usr/local/bundle/bundler/gems/mongoid-rspec-e8fcc17be493/mongoid-rspec.gemspec:18.
The Mongoid `primary_key` option for the`belongs_to` and `has_many` relationships should be supported similar to the existing `with_foreign_key` mongoid-rspec relationship option.
I have a Rails application composed of a mixture of ActiveRecord and Mongoid models. I was able to write my unit tests until now the having configured my `rails_helper.rb` file...
I'm using mongoid version is 5.1.x with this gem but just got this error in the rspec test. How can I solve this issue? `undefined method `accepts_nested_attributes_for' for Order:Class`
Cf https://stackoverflow.com/questions/50647759/rspec-expect-no-mongoid-database-query-fired I was wondering if it would be possible to add a matcher that checks whether any Mongoid query is performed by a block of code. I am implementing...
Similar to the mass-assignment matchers, but for https://api.rubyonrails.org/v5.1/classes/ActiveRecord/ReadonlyAttributes/ClassMethods.html
Mongoid is currently at the version 7 but we supporting the all the gem since the version 2. It is a good thing that `mongoid-rspec` can offer a set that...