module Minitest::Assertions

Direct including types

Defined in:

assertions.cr

Instance Method Summary

Macro Summary

Instance Method Detail

def assert(actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert(message = nil, file = __FILE__, line = __LINE__, &) : Bool #

[View source]
def assert_empty(actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert_equal(expected, actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert_in_delta(expected : Number, actual : Number, delta : Number = 0.001, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert_in_epsilon(a : Number, b : Number, epsilon : Number = 0.001, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert_includes(collection, obj, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert_instance_of(cls, obj, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert_match(pattern : Regex, actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert_match(pattern, actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert_nil(actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert_output(stdout = nil, stderr = nil, file = __FILE__, line = __LINE__, &) : Bool #

[View source]
def assert_raises(message : String | Nil = nil, file = __FILE__, line = __LINE__, &) : Exception #

[View source]
def assert_raises(klass : T.class, file = __FILE__, line = __LINE__, &) : T forall T #

[View source]
def assert_same(expected, actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def assert_silent(file = __FILE__, line = __LINE__, &) : Bool #

[View source]
def capture_io(&) : Tuple(String, String) #

[View source]
def diff(expected : String, actual : String) : String #

[View source]
def diff(expected, actual) : String #

[View source]
def flunk(message = "Epic Fail!", file = __FILE__, line = __LINE__) : NoReturn #

[View source]
def message(message : Nil, &block : -> String) : -> String #

[View source]
def message(message : String, &block : -> String) : -> String #

[View source]
def message(message : Proc(String), &block : -> String) : -> String #

[View source]
def refute(actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def refute(message = nil, file = __FILE__, line = __LINE__, &) : Bool #

[View source]
def refute_empty(actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def refute_equal(expected, actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def refute_in_delta(expected : Number, actual : Number, delta : Number = 0.001, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def refute_in_epsilon(a : Number, b : Number, epsilon : Number = 0.001, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def refute_includes(collection, obj, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def refute_instance_of(cls, obj, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def refute_match(pattern : Regex, actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def refute_match(pattern, actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def refute_nil(actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def refute_same(expected, actual, message = nil, file = __FILE__, line = __LINE__) : Bool #

[View source]
def skip(message = "", file = __FILE__, line = __LINE__) : NoReturn #

[View source]

Macro Detail

macro assert_responds_to(obj, method, message = nil, file = __FILE__, line = __LINE__) #

[View source]
macro refute_responds_to(obj, method, message = nil, file = __FILE__, line = __LINE__) #

[View source]