Skip to content

Instantly share code, notes, and snippets.

@llaskin
Created January 6, 2012 15:25
Show Gist options
  • Save llaskin/1571045 to your computer and use it in GitHub Desktop.
Save llaskin/1571045 to your computer and use it in GitHub Desktop.
value1 = "14"
value2 = "14.00"
assert_less_than_equal(((value1.to_f - value2.to_f)/value1.to_f).abs, 0.0, "Some error text")
def assert_less_than_equal(aExp, aActual, sTestText)
if aExp <= aActual
$Sel_log.result(true, sTestText)
else
$Sel_log.result(false, sTestText.upcase)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment