class Easytest::Expectation

An expectation in test cases.

Attributes

actual[R]
block[R]
negate[R]
negate?[R]

Public Instance Methods

initialize(untyped actual, ?negate: bool) ?{ () -> void } → void click to toggle source
# File sig/_internal/easytest/expectation.rbs, line(s) 13:13
def initialize: (untyped actual, ?negate: bool) ?{ () -> void } -> void
not() → Expectation click to toggle source

Negate this expectation.

# File sig/easytest.rbs, line(s) 31:31
def not: () -> Expectation
to_be(untyped expected) → untyped click to toggle source

Expect to be the same as the given object.

# File sig/easytest.rbs, line(s) 38:38
def to_be: (untyped expected) -> untyped
to_be_a(Module expected) → void click to toggle source

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
to_be_empty() → void click to toggle source

Expect to be empty.

# File sig/easytest.rbs, line(s) 59:59
def to_be_empty: () -> void
to_be_false() → void click to toggle source

Expect to be false. Same as to_be(false).

# File sig/easytest.rbs, line(s) 44:44
def to_be_false: () -> void
to_be_instance_of(Module expected) → void click to toggle source

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
to_be_kind_of(Module expected) → void click to toggle source

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
to_be_nil() → void click to toggle source

Expect to be nil. Same as to_be(nil).

# File sig/easytest.rbs, line(s) 41:41
def to_be_nil: () -> void
to_be_true() → void click to toggle source

Expect to be true. Same as to_be(true).

# File sig/easytest.rbs, line(s) 47:47
def to_be_true: () -> void
to_contain_exactly(*untyped expected) → void click to toggle source

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
to_eq(untyped expected) → void click to toggle source

Expect to equal the given object.

# File sig/easytest.rbs, line(s) 34:34
def to_eq: (untyped expected) -> void
Also aliased as: to_equal
to_equal
Alias for: to_eq
to_have_attributes(**untyped expected) → void click to toggle source

Expect to have the given attributes.

# File sig/easytest.rbs, line(s) 71:71
def to_have_attributes: (**untyped expected) -> void
to_include(untyped expected) → void click to toggle source

Expect to include the given object.

# File sig/easytest.rbs, line(s) 62:62
def to_include: (untyped expected) -> void
to_match(untyped expected) → void click to toggle source

Expect to match the given object.

# File sig/easytest.rbs, line(s) 65:65
def to_match: (untyped expected) -> void
to_raise(Class expected, ?(String | Regexp)? with_message) → void click to toggle source
to_raise(String | Regexp 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
to_raise_nothing() → void click to toggle source

Expect to raise nothing.

# File sig/easytest.rbs, line(s) 81:81
def to_raise_nothing: () -> void
to_satisfy() { (untyped actual) -> bool } → void click to toggle source

Expect to satisfy a condition that the given block returns true.

# File sig/easytest.rbs, line(s) 74:74
def to_satisfy: () { (untyped actual) -> bool } -> void