I want to check if no attributes on an ActiveRecord object have been modified. Currently I’m doing this:
prev_attr = obj.attributes <- this will give me back a Hash with attr name and attr value
And then, later, I grab the attributes again and compare the 2 hashes. Is there another way?
You should just be able to use equality matchers – does this not work for you?
Or to use your example: