lib/rubocop/cop/rspec/leading_subject.rb in rubocop-rspec-1.23.0 vs lib/rubocop/cop/rspec/leading_subject.rb in rubocop-rspec-1.24.0
- old
+ new
@@ -25,9 +25,11 @@
# it 'is valid' do
# expect(subject.valid?).to be(true)
# end
# end
class LeadingSubject < Cop
+ include RangeHelp
+
MSG = 'Declare `subject` above any other `let` declarations.'.freeze
def_node_matcher :subject?, '(block $(send nil? :subject ...) args ...)'
def on_block(node)