Class: Shirobai::Cop::RSpec::EmptyLineAfterExampleGroup

Inherits:
RuboCop::Cop::Base
  • Object
show all
Extended by:
RuboCop::Cop::AutoCorrector
Includes:
BundleEligible, EmptyLineSeparationSupport
Defined in:
lib/shirobai/cop/rspec/empty_line_after_example_group.rb

Overview

Drop-in Rust reimplementation of RSpec/EmptyLineAfterExampleGroup (rubocop-rspec 3.10.2).

Flags every plain-block spec group (describe/context/... AND shared_examples/shared_context with an RSpec receiver) that has a following sibling in a :begin sequence. Config-less.

Constant Summary collapse

MSG =
"Add an empty line after `%<example_group>s`."

Class Method Summary collapse

Instance Method Summary collapse

Methods included from EmptyLineSeparationSupport

#emit_empty_line_offenses

Class Method Details

.badgeObject



20
# File 'lib/shirobai/cop/rspec/empty_line_after_example_group.rb', line 20

def self.badge = RuboCop::Cop::Badge.parse(cop_name)

.bundle_args(_config) ⇒ Object



22
23
24
# File 'lib/shirobai/cop/rspec/empty_line_after_example_group.rb', line 22

def self.bundle_args(_config)
  []
end

.cop_nameObject



19
# File 'lib/shirobai/cop/rspec/empty_line_after_example_group.rb', line 19

def self.cop_name = "RSpec/EmptyLineAfterExampleGroup"

Instance Method Details

#on_new_investigationObject



26
27
28
29
30
# File 'lib/shirobai/cop/rspec/empty_line_after_example_group.rb', line 26

def on_new_investigation
  emit_empty_line_offenses(resolved_offenses) do |method|
    format(MSG, example_group: method)
  end
end