Library providing tools for writing and running RSpec tests.
Matcher for checking whether an object can be constructed via #new and #initialize, and the parameters accepted by #initialize.
DEFAULT_EXPECTED_ITEMS
= Object.new
#actual => Object (readonly)
#argument =>
Also known as:
arguments
Convenience method for more fluent specs. Does nothing and returns self.
#description => Object
#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 :new. If so, allocates an instance and checks the parameters expected by #initialize against the expected parameters, if any.
#with count => RespondToMatcher
#with *keywords =>
#with count, *keywords =>
Adds a parameter count expectation and/or one or more keyword expectations.
#with count => RespondToMatcher
Adds a parameter count expectation.
#with *keywords =>
Adds one or more keyword expectations.
#with count, *keywords =>
Adds a parameter count expectation and one or more keyword expectations.
#with_a_block =>
Also known as:
and_a_block
Adds a block expectation. The actual object will only match a block expectation if it expects a parameter of the form &block.
#with_arbitrary_keywords => Object
Also known as:
and_arbitrary_keywords
, with_any_keywords
Adds an arbitrary keyword expectation, e.g. that the method supports any keywords with splatted hash arguments of the form **kwargs.
#with_keywords =>
Also known as:
and_keywords
Adds one or more keyword expectations.
#with_unlimited_arguments =>
Also known as:
and_unlimited_arguments
Adds an unlimited parameter count expectation, e.g. that the method supports splatted array arguments of the form *args.
Back to Documentation | Versions | 2.8 | Reference | RSpec | RSpec::SleepingKingStudios | RSpec::SleepingKingStudios::Matchers | RSpec::SleepingKingStudios::Matchers::Core