# File test/unit/assertions.rb, line 313 def assert_in_delta(expected_float, actual_float, delta, message="") _wrap_assertion { {expected_float => "first float", actual_float => "second float", delta => "delta"}.each { |float, name| assert_respond_to(float, to_f:to_f, "The arguments must respond to to_f; the #{name} did not") } full_message = build_message(message, expected_float, actual_float, delta) { |arg1, arg2, arg3| "Expected <#{arg1}> and <#{arg2}> to be within <#{arg3}> of each other" } assert_block(full_message) { (expected_float - actual_float).abs < delta.abs } } end