Class: RSpecApi::Matchers::Response::Matcher
- Inherits:
-
Object
- Object
- RSpecApi::Matchers::Response::Matcher
show all
- Defined in:
- lib/rspec-api/matchers/response/matcher.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Instance Attribute Details
#response ⇒ Object
Returns the value of attribute response.
8
9
10
|
# File 'lib/rspec-api/matchers/response/matcher.rb', line 8
def response
@response
end
|
Instance Method Details
#description ⇒ Object
16
17
18
|
# File 'lib/rspec-api/matchers/response/matcher.rb', line 16
def description
%Q(be a valid response)
end
|
#failure_message_for_should ⇒ Object
20
21
22
|
# File 'lib/rspec-api/matchers/response/matcher.rb', line 20
def failure_message_for_should
"expected #{match} to #{description}, but got #{actual}"
end
|
#failure_message_for_should_not ⇒ Object
24
25
26
|
# File 'lib/rspec-api/matchers/response/matcher.rb', line 24
def failure_message_for_should_not
"expected #{match} not to #{description}, but got #{actual}"
end
|
#matches?(response) ⇒ Boolean
Also known as:
==
10
11
12
13
|
# File 'lib/rspec-api/matchers/response/matcher.rb', line 10
def matches?(response)
@response = response || OpenStruct.new
status || || body
end
|