Codewars Test Framework
#
Basic Setup#
Assertionsassert_equals
#
Test.assert_equals(actual, expected, msg = nil)
Checks that the actual value equals the expected value.
assert_not_equals
#
Test.assert_not_equals(actual, unexpected, msg = nil)
Checks that the actual value does not equal the unexpected value.
expect_error
#
Test.expect_error(msg, &block)
Checks that block
raises an error.
expect_no_error
#
Test.expect_no_error(msg, &block)
Checks that block
raises no error.
expect
#
Test.expect(passed, msg = nil)
Checks that passed
is truthy.
#
Utilitiesrandom_number
#
Test.random_number()
Returns a random number.
random_token
#
Test.random_token()
Returns a random string.