class Easytest::Expectation
An expectation in test cases.
Attributes
Public Instance Methods
# File sig/_internal/easytest/expectation.rbs, line(s) 13:13
def initialize: (untyped actual, ?negate: bool) ?{ () -> void } -> void
Negate this expectation.
# File sig/easytest.rbs, line(s) 31:31
def not: () -> Expectation
Expect to be the same as the given object.
# File sig/easytest.rbs, line(s) 38:38
def to_be: (untyped expected) -> untyped
Expect to be an instance of the given class (module) or its subclasses.
# File sig/easytest.rbs, line(s) 50:50
def to_be_a: (Module expected) -> void
Expect to be empty.
# File sig/easytest.rbs, line(s) 59:59
def to_be_empty: () -> void
Expect to be false
. Same as to_be(false)
.
# File sig/easytest.rbs, line(s) 44:44
def to_be_false: () -> void
Expect to be an instance of the given class (module).
# File sig/easytest.rbs, line(s) 56:56
def to_be_instance_of: (Module expected) -> void
Expect to be an instance of the given class (module) or its subclasses.
# File sig/easytest.rbs, line(s) 53:53
def to_be_kind_of: (Module expected) -> void
Expect to be nil
. Same as to_be(nil)
.
# File sig/easytest.rbs, line(s) 41:41
def to_be_nil: () -> void
Expect to be true
. Same as to_be(true)
.
# File sig/easytest.rbs, line(s) 47:47
def to_be_true: () -> void
Expect to contain all the given items regardless of order.
# File sig/easytest.rbs, line(s) 68:68
def to_contain_exactly: (*untyped expected) -> void
Expect to equal the given object.
# File sig/easytest.rbs, line(s) 34:34
def to_eq: (untyped expected) -> void
Expect to have the given attributes.
# File sig/easytest.rbs, line(s) 71:71
def to_have_attributes: (**untyped expected) -> void
Expect to include the given object.
# File sig/easytest.rbs, line(s) 62:62
def to_include: (untyped expected) -> void
Expect to match the given object.
# File sig/easytest.rbs, line(s) 65:65
def to_match: (untyped expected) -> void
Expect to raise the given exception or an exception with the given message.
# File sig/easytest.rbs, line(s) 77:78
def to_raise: (Class expected, ?(String | Regexp)? with_message) -> void
| ((String | Regexp) expected) -> void
Expect to raise nothing.
# File sig/easytest.rbs, line(s) 81:81
def to_raise_nothing: () -> void
Expect to satisfy a condition that the given block returns true
.
# File sig/easytest.rbs, line(s) 74:74
def to_satisfy: () { (untyped actual) -> boolish } -> void