Class: RSpec::Core::Bisect::ShellRunner

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/core/bisect/shell_runner.rb

Overview

Provides an API to run the suite for a set of locations, using the given bisect server to capture the results.

Sets of specs are run by shelling out.

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(server, shell_command) ⇒ ShellRunner

Returns a new instance of ShellRunner



19
20
21
22
# File 'lib/rspec/core/bisect/shell_runner.rb', line 19

def initialize(server, shell_command)
  @server        = server
  @shell_command = shell_command
end

Class Method Details

.start(shell_command) ⇒ Object



13
14
15
16
17
# File 'lib/rspec/core/bisect/shell_runner.rb', line 13

def self.start(shell_command)
  Server.run do |server|
    yield new(server, shell_command)
  end
end

Instance Method Details

#original_resultsObject



28
29
30
# File 'lib/rspec/core/bisect/shell_runner.rb', line 28

def original_results
  @original_results ||= run_locations(@shell_command.original_locations)
end

#run(locations) ⇒ Object



24
25
26
# File 'lib/rspec/core/bisect/shell_runner.rb', line 24

def run(locations)
  run_locations(locations, original_results.failed_example_ids)
end