Closed katelovescode closed 2 years ago
I think the have_attributes method directly pull the values that is stored in table so it will not be mapped to Money class object and also the value of field fee is not stored as object of Money class (ref: link). But the 'model.fee' will return an object of money class this this is done by money gem. I hope this answers your question. Thank you.
Right now I have a model and a spec and I can only do the matcher specifically with
eq
as opposed tohave_attributes
, but only when the number is not zero.ex:
This column was created before we started using Money, so we're converting it in the getter
Is there a reason the fourth example passes but the third example fails with the
have_attributes
matcher?