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

undefined method `validate_uniqueness_of' #160

Closed
spurnaye opened this issue Oct 23, 2015 · 2 comments
Closed

undefined method `validate_uniqueness_of' #160

spurnaye opened this issue Oct 23, 2015 · 2 comments

Comments

@spurnaye
Copy link

Hello,
I am getting error mentioned above:

     Failure/Error: it { is_expected.to validate_uniqueness_of(:name) }
     NoMethodError:
       undefined method `validate_uniqueness_of' for #<RSpec::ExampleGroups::Word:0x007fe6c59525a0>

mongoid-5.0.0
mongoid-rspec-3.0.0

@akarmes
Copy link
Contributor

akarmes commented Oct 23, 2015

Hi @spurnaye. Could you show your spec_helper.rb and, possibly, rails_helper.rb

@spurnaye
Copy link
Author

Hey @90yukke, I think there was some configuration missing from my side. Everything is good now.

I had to include

require 'mongoid-rspec'
  config.include Mongoid::Matchers, type: :model

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

2 participants