The attribute_was
method will look for the value the attribute had when it was persisted for the last time. If you haven't persisted the attribute, it will return false
if you run .present?
or expect it to be_present
.
So, in your case, I would assume you're either just writing expectations on an object that has only been instantiated but not saved, or you have saved the object with an empty or nil value for association_id
.