Method: RSpec::Matchers::BuiltIn::RespondTo#with_keywords

Defined in:
lib/rspec/matchers/built_in/respond_to.rb

#with_keywords(*keywords) ⇒ Object Also known as: and_keywords

Specifies keyword arguments, if any.

Examples:

expect(obj).to respond_to(:message).with_keywords(:color, :shape)

with an expected number of arguments

expect(obj).to respond_to(:message).with(3).arguments.and_keywords(:color, :shape)


36
37
38
39
# File 'lib/rspec/matchers/built_in/respond_to.rb', line 36

def with_keywords(*keywords)
  @expected_keywords = keywords
  self
end