# File lib/test/unit/assertions.rb, line 445
def assert_in_delta(expected_float, actual_float, delta, message="")
_wrap_assertion do
{expected_float => "first float", actual_float => "second float", delta => "delta"}.each do |float, name|
assert_respond_to(float, :to_f, "The arguments must respond to to_f; the #{name} did not")
end
assert_operator(delta, :>=, 0.0, "The delta should not be negative")
full_message = build_message(message, "<?> and\n<?> expected to be within\n<?> of each other.\n", expected_float, actual_float, delta)
assert_block(full_message) { (expected_float.to_f - actual_float.to_f).abs <= delta.to_f }
end
end