The updated_at has class ActiveSupport::TimeWithZone
v.updated_at.should == f.updated_at fails
v.updated_at.to_datetime.should == f.to_datetime.updated_at fails
v.updated_at.to_s.should == f.updated_at.to_s works
v.updated_at.to_i.should == f.updated_at.to_i works
And adding this method to the m
David Chelimsky wrote:
> On Jul 8, 2010, at 5:04 AM, Juanma Cervera wrote:
>
>> 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 sa
On Jul 8, 2010, at 5:04 AM, Juanma Cervera wrote:
> 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
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 fr