Skip to content

Instantly share code, notes, and snippets.

@jjthrash
Created May 31, 2013 13:43
Show Gist options
  • Select an option

  • Save jjthrash/5685062 to your computer and use it in GitHub Desktop.

Select an option

Save jjthrash/5685062 to your computer and use it in GitHub Desktop.
# File minitest/unit.rb, line 230
def assert_in_delta exp, act, delta = 0.001, msg = nil
n = (exp - act).abs
msg = message(msg) { "Expected #{exp} - #{act} (#{n}) to be < #{delta}" }
assert delta >= n, msg
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment