Class: RSpec::Core::Configuration::DeprecationReporterBuffer

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb

Overview

This buffer is used to capture all messages sent to the reporter during reporter initialization. It can then replay those messages after the formatter is correctly initialized. Otherwise, deprecation warnings during formatter initialization can cause an infinite loop.

Instance Method Summary collapse

Constructor Details

#initializeDeprecationReporterBuffer

Returns a new instance of DeprecationReporterBuffer.



1019
1020
1021
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb', line 1019

def initialize
  @calls = []
end

Instance Method Details

#deprecation(*args) ⇒ Object



1023
1024
1025
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb', line 1023

def deprecation(*args)
  @calls << args
end

#play_onto(reporter) ⇒ Object



1027
1028
1029
1030
1031
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/configuration.rb', line 1027

def play_onto(reporter)
  @calls.each do |args|
    reporter.deprecation(*args)
  end
end