lib/rubocop/cop/rspec/subject_stub.rb in rubocop-rspec-2.31.0 vs lib/rubocop/cop/rspec/subject_stub.rb in rubocop-rspec-3.0.0.pre
- old
+ new
@@ -111,11 +111,11 @@
:receive :receive_messages :receive_message_chain :have_received
} ...)
PATTERN
def on_top_level_group(node)
- @explicit_subjects = find_all_explicit(node, &method(:subject?))
- @subject_overrides = find_all_explicit(node, &method(:let?))
+ @explicit_subjects = find_all_explicit(node) { |n| subject?(n) }
+ @subject_overrides = find_all_explicit(node) { |n| let?(n) }
find_subject_expectations(node) do |stub|
add_offense(stub)
end
end