RSpec

Library providing tools for writing and running RSpec tests.

Class: RSpec::SleepingKingStudios::Matchers::BuiltIn::RespondToMatcher

Parent Namespace
RSpec::SleepingKingStudios::Matchers::BuiltIn
Inherited Classes
RSpec::Matchers::BuiltIn::RespondTo > Object
Included Modules
RSpec::SleepingKingStudios::Matchers::Shared::MatchParameters
Defined In
lib/rspec/sleeping_king_studios/matchers/built_in/respond_to_matcher.rb

Table Of Contents

Overview

Extensions to the built-in RSpec #respond_to matcher.

Back To Top

Constructor

#initialize => RespondToMatcher

Returns

Back To Top

Instance Methods

#argument =>

Also known as: arguments

Inherited From
RSpec::SleepingKingStudios::Matchers::Shared::MatchParameters

Convenience method for more fluent specs. Does nothing and returns self.

Returns

#description => Object

#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.

#with count => RespondToMatcher
#with *keywords =>
#with count, *keywords =>

Inherited From
RSpec::SleepingKingStudios::Matchers::Shared::MatchParameters

Adds a parameter count expectation and/or one or more keyword expectations.

Overloads

#with count => RespondToMatcher

Adds a parameter count expectation.

Parameters
  • count (Integer, Range, nil) — (optional) The number of expected parameters.
Returns
  • (RespondToMatcher) — self
#with *keywords =>

Adds one or more keyword expectations.

Parameters
  • keywords (Array<String, Symbol>) — List of keyword arguments accepted by the method.
Returns
  • () — self
#with count, *keywords =>

Adds a parameter count expectation and one or more keyword expectations.

Parameters
  • count (Integer, Range, nil) — (optional) The number of expected parameters.
  • keywords (Array<String, Symbol>) — List of keyword arguments accepted by the method.
Returns
  • () — self

#with_a_block =>

Also known as: and_a_block

Inherited From
RSpec::SleepingKingStudios::Matchers::Shared::MatchParameters

Adds a block expectation. The actual object will only match a block expectation if it expects a parameter of the form &block.

Returns

#with_arbitrary_keywords => Object

Also known as: and_arbitrary_keywords, with_any_keywords

Inherited From
RSpec::SleepingKingStudios::Matchers::Shared::MatchParameters

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

Inherited From
RSpec::SleepingKingStudios::Matchers::Shared::MatchParameters

Adds one or more keyword expectations.

Parameters

Returns

#with_unlimited_arguments =>

Also known as: and_unlimited_arguments

Inherited From
RSpec::SleepingKingStudios::Matchers::Shared::MatchParameters

Adds an unlimited parameter count expectation, e.g. that the method supports splatted array arguments of the form *args.

Returns

Back To Top


Back to Documentation | Versions | 2.8 | Reference | RSpec | RSpec::SleepingKingStudios | RSpec::SleepingKingStudios::Matchers | RSpec::SleepingKingStudios::Matchers::BuiltIn