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