On Sun, Jan 11, 2009 at 12:17 AM, Greg Hauptmann <
greg.hauptmann.r...@gmail.com> wrote:

>
> Any suggestions on how to write an rspec expectation for equality when you
> get a BigDecimal back.  I see that "big_decimal_variable.should == 123.23"
> doesn't work as the ruby BigDecimal comparison (via ==) to the same Float
> value gives false (not true as you'd expect).
>

How about bd.to_s.should == 123.23.to_s ?

///ark
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to