Sha256: 1489616d5bae10bf1d9bd553c5273f8d49db5ae558a26f1e3d86b4827e250170
Contents?: true
Size: 915 Bytes
Versions: 20
Compression:
Stored size: 915 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) 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
20 entries across 18 versions & 2 rubygems