struct Spectator::Anything
- Spectator::Anything
- Struct
- Value
- Object
Overview
Type dedicated to matching everything. This is intended to be used as a value to compare against when the value doesn't matter. Can be used like so:
anything = Spectator::Anything.new
expect("foo").to match(anything)
Defined in:
spectator/anything.crConstructors
Instance Method Summary
-
#===(other)
Always returns true.
- #initialize
-
#inspect(io : IO) : Nil
Displays "
". -
#to_s(io : IO) : Nil
Displays "anything".
Instance methods inherited from class Object
should(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall Ushould(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should, should_eventually(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_eventually, should_never(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_never, should_not(matcher : Spectator::Matchers::TypeMatcher(U), message = nil, *, _file = __FILE__, _line = __LINE__) forall U
should_not(matcher : Spectator::Matchers::NilMatcher, message = nil, *, _file = __FILE__, _line = __LINE__)
should_not(matcher, message = nil, *, _file = __FILE__, _line = __LINE__) should_not