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

Naming conflict with shoulda matchers #161

Open
Bartuz opened this issue Nov 9, 2015 · 2 comments
Open

Naming conflict with shoulda matchers #161

Bartuz opened this issue Nov 9, 2015 · 2 comments
Labels

Comments

@Bartuz
Copy link

Bartuz commented Nov 9, 2015

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

@Bartuz
Copy link
Author

Bartuz commented Nov 9, 2015

My temporary solution: Mongoid::Matchers::Associations.send(:alias_method, :related_and_belong_to_many, :have_and_belong_to_many)

@dblock dblock added the bug? label Jan 4, 2018
@dblock
Copy link
Collaborator

dblock commented Jan 4, 2018

This is old, but would appreciate a spec/PR with a fix @Bartuz.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants