lib/rubocop/cop/rspec/change_by_zero.rb in rubocop-rspec-3.1.0 vs lib/rubocop/cop/rspec/change_by_zero.rb in rubocop-rspec-3.2.0
- old
+ new
@@ -116,10 +116,11 @@
end
end
# rubocop:enable Metrics/MethodLength
def compound_expectations?(node)
- %i[and or & |].include?(node.parent.method_name)
+ node.parent.send_type? &&
+ %i[and or & |].include?(node.parent.method_name)
end
def message(change_node)
format(MSG, method: change_node.method_name)
end