Library providing tools for writing and running RSpec tests.
Matcher for testing whether an object has a specific predicate, e.g. responds to :property?.
DEFAULT_EXPECTED_ITEMS
= Object.new
#initialize expected => HavePredicateMatcher
#actual => Object (readonly)
#description => String
Generates a description of the matcher expectation.
#does_not_match? actual => Boolean
Inverse of #matches? method.
#failure_message => Object
Message for when the object does not match, but was expected to. Make sure to always call #matches? first to set up the matcher state.
#failure_message_when_negated => Object
Message for when the object matches, but was expected not to. Make sure to always call #matches? first to set up the matcher state.
#matches? actual => Boolean
Checks if the object responds to #expected?. Additionally, if a value expectation is set, compares the value of #expected to the specified value.
#with_value value => HaveReaderMatcher
Also known as:
with
Sets a value expectation. The matcher will compare the value from #property? with the specified value.
Back to Documentation | Versions | 2.8 | Reference | RSpec | RSpec::SleepingKingStudios | RSpec::SleepingKingStudios::Matchers | RSpec::SleepingKingStudios::Matchers::Core