lib/rubocop/cop/rspec/let_setup.rb in rubocop-rspec-2.12.1 vs lib/rubocop/cop/rspec/let_setup.rb in rubocop-rspec-2.13.0
- old
+ new
@@ -4,24 +4,24 @@
module Cop
module RSpec
# Checks unreferenced `let!` calls being used for test setup.
#
# @example
- # # Bad
+ # # bad
# let!(:my_widget) { create(:widget) }
#
# it 'counts widgets' do
# expect(Widget.count).to eq(1)
# end
#
- # # Good
+ # # good
# it 'counts widgets' do
# create(:widget)
# expect(Widget.count).to eq(1)
# end
#
- # # Good
+ # # good
# before { create(:widget) }
#
# it 'counts widgets' do
# expect(Widget.count).to eq(1)
# end
@@ -47,10 +47,10 @@
PATTERN
# @!method method_called?(node)
def_node_search :method_called?, '(send nil? %)'
- def on_block(node)
+ def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
return unless example_or_shared_group_or_including?(node)
unused_let_bang(node) do |let|
add_offense(let)
end