2009-01-11 18:17, Greg Hauptmann:
> 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"

If you register keywords "comparison" and "float", you should train
yourself to cry out "delta" without even thinking.  ;)

Would this work for you?

  big_decimal_variable.should be_close(123.23, 0.005)

-- 
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to