lib/rubocop/cop/rspec/named_subject.rb in rubocop-rspec-1.18.0 vs lib/rubocop/cop/rspec/named_subject.rb in rubocop-rspec-1.19.0
- old
+ new
@@ -46,16 +46,16 @@
#{Examples::ALL.block_pattern}
#{Hooks::ALL.block_pattern}
}
PATTERN
- def_node_matcher :unnamed_subject, '$(send nil :subject)'
+ def_node_matcher :unnamed_subject, '$(send nil? :subject)'
def on_block(node)
return unless rspec_block?(node)
subject_usage(node) do |subject_node|
- add_offense(subject_node, :selector)
+ add_offense(subject_node, location: :selector)
end
end
private