...and, while I was composing that message, Brian sent me the following: > Rspec does provide the be_close matcher. See cheat rspec.
@temperature.ctof(37).should be_close(98.6, 0.1) This will work (I'll go update the code now) but it still leaves the problem I mentioned that if you are unfamiliar with the vagaries of floating point math -- or even if you momentarily forget -- then using == will occasionally mysteriously fail. So my proposal remains: can the == matcher do be_close(x, 0.0000000001) for floats? Arguments pro and con? --- Alex Chaffee - a...@stinky.com - http://alexch.github.com Stalk me: http://friendfeed.com/alexch | http://twitter.com/alexch | http://alexch.tumblr.com _______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users