Open Bartuz opened 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.
have_and_belong_to_many(:association_name)
mongoid-rspec
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)
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.
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 andmongoid-rspec
matchers.Here is missing alias: https://github.com/mongoid-rspec/mongoid-rspec/blob/master/lib/matchers/associations.rb#L321-L323