Skip to content

Commit

Permalink
Refactor. Call lat_bang with block
Browse files Browse the repository at this point in the history
  • Loading branch information
andrykonchin committed Jul 2, 2020
1 parent 28660a7 commit 08e9033
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/rubocop/cop/rspec/let_setup.rb
Expand Up @@ -56,12 +56,9 @@ def unused_let_bang(node)
end
end

def child_let_bang(node)
lets = RuboCop::RSpec::ExampleGroup.new(node).lets

lets.each do |let|
node_with_name = let_bang(let)
yield node_with_name if node_with_name
def child_let_bang(node, &block)
RuboCop::RSpec::ExampleGroup.new(node).lets.each do |let|
let_bang(let, &block)
end
end
end
Expand Down

0 comments on commit 08e9033

Please sign in to comment.