We have set up a has and belongs to many association between our 'entries' table and our 'words' table. The association is set in the models and the join table has been created and migrated.
We are using shoulda-matchers to test this association and seeing the following error:
2) Word should have and belong to many entries
Failure/Error: it { should have_and_belong_to_many(:entries) }
Expected Word to have a has_and_belongs_to_many association called entries (actual association type was has_many)
(same error message for entries --> words)
When we go into rails console we can call 'entry_object.words' and 'word_object.entries' with no problem at all.
We have set up a has and belongs to many association between our 'entries' table and our 'words' table. The association is set in the models and the join table has been created and migrated.
We are using shoulda-matchers to test this association and seeing the following error:
2) Word should have and belong to many entries Failure/Error: it { should have_and_belong_to_many(:entries) } Expected Word to have a has_and_belongs_to_many association called entries (actual association type was has_many)
(same error message for entries --> words)
When we go into rails console we can call 'entry_object.words' and 'word_object.entries' with no problem at all.
Can't figure out why our tests are failing.