Sha256: b38f4cb2d5a968288f944d67daac980cdda2d40b5bfb224c1a60cd95751e776f
Contents?: true
Size: 965 Bytes
Versions: 15
Compression:
Stored size: 965 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module RSpec # Checks if there is an empty line after example group blocks. # # @example # # bad # RSpec.describe Foo do # describe '#bar' do # end # describe '#baz' do # end # end # # # good # RSpec.describe Foo do # describe '#bar' do # end # # describe '#baz' do # end # end # class EmptyLineAfterExampleGroup < Base extend AutoCorrector include EmptyLineSeparation MSG = 'Add an empty line after `%<example_group>s`.' def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler return unless example_group?(node) missing_separating_line_offense(node) do |method| format(MSG, example_group: method) end end end end end end
Version data entries
15 entries across 15 versions & 2 rubygems