You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let(:model) { FactoryGirl.create(:model) }
it 'association does not equal nil' do
post :add_assocation, { <necessary_params> }
expect{ model.reload.association }.to eventually_not eq nil
end
I have used the be_nil matcher as well. If I replace model.reload.association with nil, then I would be testing nil to eventually equal nil, which works but I want to check that model.reload.association is equal to nil.
I tried this in a controller spec:
Also tried:
here's the error message:
Model and association have a one to one relationship.
Any advice would be appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: