assert : assertions
A utility object containing a bunch of assertions. If an assertion fails, it will throw an exception. Values can be functions or regular values, but functions are recommended.
assert
assert { block }
assert { block }, message
If block does not evaluate to to true, throw an exception. If provided, message will be used for the exception.
assert_equal
assert_equal expected, given
Assert the two given values are equal (using ==
).
assert_fail
assert_fail { block }
Assert the given block throws an exception.
assert_false
assert_false { condition }
Assert the given condition is false.
assert_match
assert_match regex, string
Assert that the given string matches the given regular expression.
assert_not_equal
assert_not_equal value, given
Asserts that given is not equal to value.
assert_null
assert_null { block }
Asserts the given value is null
.