class RuboCop::Cop::RSpec::EmptyLineAfterHook
it { does_something }
around { |test| test.run }
# good
it { does_something }
after { do_something }
# good
it { does_something }
before { do_something }
# good
it { does_something }
around { |test| test.run }
# bad
it { does_something }
after { do_something }
# bad
it { does_something }
before { do_something }
# bad
@example
Checks if there is an empty line after hook blocks.
def on_block(node)
def on_block(node) return unless hook?(node) return if last_child?(node) missing_separating_line(node) do |location| add_offense( node, location: location, message: format(MSG, hook: node.method_name) ) end end