mongoid-rspec
mongoid-rspec copied to clipboard
Naming conflict with shoulda matchers
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
My temporary solution: Mongoid::Matchers::Associations.send(:alias_method, :related_and_belong_to_many, :have_and_belong_to_many)
This is old, but would appreciate a spec/PR with a fix @Bartuz.