[rspec-users] Testing equality
Juanma Cervera
lists at ruby-forum.com
Thu Jul 8 06:04:55 EDT 2010
Hello
How can I test equality with two objects when they include some
attribute that is BigDecimal?
if I make something like this:
it "should ...whatever" do
obj = Factory.create(:my_object)
...
MyObject.first.should == obj
end.
FAILS
This fails because the object expected is different from the object
gotten, and the only difference are the BigDecimal attributes, that are
different objects, even though they have the same value.
Thanks.
--
Posted via http://www.ruby-forum.com/.
More information about the rspec-users
mailing list