Class: RSpec::Distrib::Worker::Configuration Private

Inherits:
Core::Configuration
  • Object
show all
Defined in:
lib/rspec/distrib/worker/configuration.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Custom configuration for RSpec which we use on workers to replace regular reporter with LeaderReporter.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#leaderDRbObject(RSpec::Distrib::Leader)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns:



9
10
11
# File 'lib/rspec/distrib/worker/configuration.rb', line 9

def leader
  @leader
end

Instance Method Details

#formatter_loaderObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Overridden method which wraps original reporter with LeaderReporter

Returns:

  • RSpec::Core::Formatters::Loader



13
14
15
16
17
18
19
# File 'lib/rspec/distrib/worker/configuration.rb', line 13

def formatter_loader
  @formatter_loader ||= begin
    original_reporter = RSpec::Core::Reporter.new(self)
    wrapped_reporter = LeaderReporter.new(leader, original_reporter)
    RSpec::Core::Formatters::Loader.new(wrapped_reporter)
  end
end

#seed_used?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Always true because seed comes from leader

Returns:

  • (Boolean)


22
23
24
# File 'lib/rspec/distrib/worker/configuration.rb', line 22

def seed_used?
  true
end