Please help me to understand why this piece of rspec code is behaving
this
way. I am setting product_id to my record, and it is asserting true, but
yet record.product not returning anything.
“Ruby on Rails: Talk” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
this way. I am setting product_id to my record, and it is asserting true,
Check how product is defined in the tshirt model. Also check the value
of
product.id, it may be nil for all we know and tshirt.product_id is also
nil
so they’re equal.