-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I tried this in a controller spec:
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
Also tried:
expect{ model.association }.to eventually_not eq nil
expect{ model.reload.association }.to_not eventually eq nil
expect{ model.reload.association }.to eventually_not(eq nil)
expect{ model.reload.association }.to eventually_not(eq nil).within 5
here's the error message:
After 46 tries, the last failure message was:
expected: nil
got: nil
(compared using ==)
Model and association have a one to one relationship.
Any advice would be appreciated.
Thanks.
Metadata
Metadata
Assignees
Labels
No labels