I have an extremely simple unit test. I'm not sure why it fails when the expected is the same as the actual!
Here is the method I am testing:
def calibration_constant
big_decimal = self.coefficient * (10**self.exponent)
return big_decimal.to_f
end
Note, that coefficient is "6.1" and exponent is "1"
Here is the relevant test line:
assert_equal(61.0.to_f, calibrations[0].calibration_constant)
Here is the output:
test_calibration_constants(PyranometerCalibrationTest): <61.0> expected but was <61.0>.
I can't for the life of me figure out why it would claim to fail, when clearly they are equal. Does anyone have any input on this situation? All of my other similar test cases work fine.
I am using Rails 2.1 (Ruby 1.8) on Windows with SQL Server 2005.
Thanks in advance for your help.