mongoid-rspec icon indicating copy to clipboard operation
mongoid-rspec copied to clipboard

RSpec matchers and macros for Mongoid.

Results 20 mongoid-rspec issues
Sort by recently updated
recently updated
newest added

I have: ```ruby class User include Mongoid::Document field :name, type: String validates_length_of :name, in: 1..100, allow_nil: true end ``` ```ruby require 'rails_helper' RSpec.describe User, type: :model do it { is_expected.to...

new feature

I'm using Mongoid 5.1.6 in a Rails 4.2.2 application. I'm able to test all the Mongoid things of my models excepted the indexes. I have a model like this: ```ruby...

bug?

https://github.com/mongoid/mongoid-rspec/blob/master/CHANGELOG.md is incomplete with history for older releases. Could be a good mindless project for someone.

chore

I have a `has_many` relation defined with `dependent: :destroy` like so: ``` class HostNode include Mongoid::Document include Mongoid::Timestamps has_many :containers, dependent: :destroy ``` On the other side of the relation,...

bug?

`have_and_belong_to_many(:association_name)` has naming conflict with should amatchers. All other matchers have aliases - which is great! I can use both shoulda matchers and `mongoid-rspec` matchers. Here is missing alias: https://github.com/mongoid-rspec/mongoid-rspec/blob/master/lib/matchers/associations.rb#L321-L323

bug?

Always feels pedant when I open this issue on projects, but it's for the greater good (so I think): http://guides.rubygems.org/name-your-gem/ It's a really minor issue to fix this way: ```...

chore

As in rails has_secure_password the maximum length validation (should be less than or equal to 72 characters) is been added automatically for password field. So, when you add something like...

bug?

Any chance that mongoid-rspec supports persistance matchers such as be_a_new: https://www.relishapp.com/rspec/rspec-rails/v/2-2/docs/matchers/be-a-new-matcher ?

new feature

I was seeing that some of the rspec-mongoid matchers are similar to the ones from shoulda matchers, but some have minor differences, like using `ensure` instead of `validate`. Shouldn't they...

new feature

I've had add a new matcher `accepts_nested_attributes_for` to test `accepts_nested_attributes` and respective options. However, mongoid implementation is different from AR as I noticed and [described here](https://github.com/mongoid/mongoid/issues/2750).Currently is not possible to...

new feature