Ruby Testing Assertions
Join the DZone community and get the full member experience.Join For Free
assert_equal(1, 1) assert_not_equal(1, 0) assert_match(/test/, "test") assert_no_match(/test/, "dfjlas") assert(true) # nil | false fails test assert_in_delta(1.3, 1.7, 0.3, "not with range") # used to identify if decimals are with a certain range of each other flunk("force test to fail") # forces test to fail
Assertion (software development)
Opinions expressed by DZone contributors are their own.