Class: RSpec::Rewind::Runner

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/rewind/runner.rb

Instance Method Summary collapse

Constructor Details

#initialize(example:, configuration:, component_factory: RunnerComponentFactory.new) ⇒ Runner

Returns a new instance of Runner.



6
7
8
9
10
11
12
# File 'lib/rspec/rewind/runner.rb', line 6

def initialize(example:, configuration:, component_factory: RunnerComponentFactory.new)
  @example = example
  @configuration = configuration.snapshot
  @component_factory = component_factory
  @context = ExampleContext.new(example: example)
  @logger = RunnerLogger.new(configuration: @configuration, warn_output: method(:warn))
end

Instance Method Details

#run(retries: nil, backoff: nil, wait: nil, retry_on: nil, skip_retry_on: nil, retry_if: nil) ⇒ Object



14
15
16
17
18
19
20
21
22
23
# File 'lib/rspec/rewind/runner.rb', line 14

def run(retries: nil, backoff: nil, wait: nil, retry_on: nil, skip_retry_on: nil, retry_if: nil)
  components.retry_loop.run(
    retries: retries,
    backoff: backoff,
    wait: wait,
    retry_on: retry_on,
    skip_retry_on: skip_retry_on,
    retry_if: retry_if
  )
end