We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e895734 commit cc499d4Copy full SHA for cc499d4
lib/rubocop/cop/rspec_rails/minitest_assertions.rb
@@ -323,15 +323,16 @@ class ResponseAssertion < BasicAssertion
323
324
# @!method self.minitest_assertion(node)
325
def_node_matcher 'self.minitest_assertion', <<~PATTERN # rubocop:disable InternalAffairs/NodeMatcherDirective
326
- (send nil? :assert_response $_ $_?)
+ (send nil? {:assert_response} $_ $_?)
327
PATTERN
328
329
def self.match(expected, failure_message)
330
- new(expected, nil, failure_message.first)
+ response = Struct.new(:source).new('response')
331
+ new(expected, response, failure_message.first)
332
end
333
334
def assertion
- "have_http_status(#{expected.source})"
335
+ "have_http_status(#{expected})"
336
337
338
0 commit comments