Class: RuboCop::Cop::RSpec::AggregateFailures

Inherits:
AggregateExamples show all
Defined in:
lib/test_prof/cops/rspec/aggregate_failures.rb

Constant Summary

Constants inherited from AggregateExamples

RuboCop::Cop::RSpec::AggregateExamples::MSG

Constants included from Language

Language::RSPEC

Constants included from RuboCop::Cop::RSpec::AggregateExamples::MatchersWithSideEffects

RuboCop::Cop::RSpec::AggregateExamples::MatchersWithSideEffects::MSG_FOR_EXPECTATIONS_WITH_SIDE_EFFECTS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AggregateExamples

#autocorrect, #on_block, registry

Constructor Details

#initializeAggregateFailures

Returns a new instance of AggregateFailures.



13
14
15
16
# File 'lib/test_prof/cops/rspec/aggregate_failures.rb', line 13

def initialize(*)
  super
  self.class.just_once { warn "`AggregateFailures` cop has been renamed to `AggregateExamples`." }
end

Class Method Details

.just_onceObject



18
19
20
21
22
# File 'lib/test_prof/cops/rspec/aggregate_failures.rb', line 18

def self.just_once
  return if @already_done
  yield
  @already_done = true
end