mongoid / mongoid-rspec

RSpec matchers and macros for Mongoid.
MIT License
499 stars 179 forks source link

Naming conflict with shoulda matchers #161

Open Bartuz opened 8 years ago

Bartuz commented 8 years ago

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 commented 8 years ago

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

dblock commented 6 years ago

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