Class: RSpec::SleepingKingStudios::Matchers::BuiltIn::IncludeMatcher
- Parent Namespace
- RSpec::SleepingKingStudios::Matchers::BuiltIn
- Inherited Classes
- RSpec::Matchers::BuiltIn::Include
>
Object
- Included Modules
- RSpec::SleepingKingStudios::Matchers::Description
- Defined In
- lib/rspec/sleeping_king_studios/matchers/built_in/include_matcher.rb
Table Of Contents
Overview
Extensions to the built-in RSpec #include matcher.
Back To Top
Constants
DEFAULT_EXPECTED_ITEMS
= Object.new
- Inherited From
- RSpec::SleepingKingStudios::Matchers::Description
Since
Back To Top
Constructor
#initialize(*expected, &block) => IncludeMatcher
Parameters
- expected (Array<Hash, Proc, Object>) — the items expected to be
matched by the actual object
Yields
- If a block is provided, the block is converted to a proc and
appended to the item expectations.
Yield Parameters
- item (Object) — An item from the actual object; yield(item)
should return true if and only if the item matches the desired
predicate.
Returns
- (IncludeMatcher) — a new instance of IncludeMatcher
Back To Top
Instance Methods
#description => Object
#does_not_match?(actual) => Boolean
Returns
#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
Returns
Back To Top
Back to
Documentation |
Versions |
2.8 |
Reference
|
RSpec
|
RSpec::SleepingKingStudios
|
RSpec::SleepingKingStudios::Matchers
|
RSpec::SleepingKingStudios::Matchers::BuiltIn