Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit d53a601

Browse files
committed
Use the config option value when printing the bisect runner.
1 parent 0e9dcc9 commit d53a601

File tree

6 files changed

+14
-6
lines changed

6 files changed

+14
-6
lines changed

features/command_line/bisect.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Feature: Bisect
9494
When I run `rspec --seed 1234 --bisect=verbose`
9595
Then bisect should succeed with output like:
9696
"""
97-
Bisect started using options: "--seed 1234" and bisect runner: RSpec::Core::Bisect::ForkRunner
97+
Bisect started using options: "--seed 1234" and bisect runner: :fork
9898
Running suite to find failures... (0.16528 seconds)
9999
- Failing examples (1):
100100
- ./spec/calculator_1_spec.rb[1:1]
@@ -171,7 +171,7 @@ Feature: Bisect
171171
When I run `rspec --seed 1234 --bisect=verbose`
172172
Then bisect should succeed with output like:
173173
"""
174-
Bisect started using options: "--seed 1234" and bisect runner: RSpec::Core::Bisect::ShellRunner
174+
Bisect started using options: "--seed 1234" and bisect runner: :shell
175175
# ...
176176
The minimal reproduction command is:
177177
rspec ./spec/calculator_10_spec.rb[1:1] ./spec/calculator_1_spec.rb[1:1] --seed 1234

lib/rspec/core/bisect/example_minimizer.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def example_range(ids)
112112

113113
def prep
114114
notify(:bisect_starting, :original_cli_args => shell_command.original_cli_args,
115-
:bisect_runner => runner.class)
115+
:bisect_runner => runner.class.name)
116116

117117
_, duration = track_duration do
118118
original_results = runner.original_results

lib/rspec/core/bisect/fork_runner.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ def self.start(shell_command, spec_runner)
4040
instance.shutdown
4141
end
4242

43+
def self.name
44+
:fork
45+
end
46+
4347
def initialize(shell_command, spec_runner)
4448
@shell_command = shell_command
4549
@channel = Channel.new

lib/rspec/core/bisect/shell_runner.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ def self.start(shell_command, _spec_runner)
1616
end
1717
end
1818

19+
def self.name
20+
:shell
21+
end
22+
1923
def initialize(server, shell_command)
2024
@server = server
2125
@shell_command = shell_command

lib/rspec/core/formatters/bisect_progress_formatter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def describe_ids(description, ids)
149149
end
150150

151151
def bisect_started_message(notification)
152-
"#{super} and bisect runner: #{notification.bisect_runner}"
152+
"#{super} and bisect runner: #{notification.bisect_runner.inspect}"
153153
end
154154
end
155155
end

spec/rspec/core/bisect/coordinator_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def find_minimal_repro(output, formatter=Formatters::BisectProgressFormatter, bi
4949
output = normalize_durations(output.string)
5050

5151
expect(output).to eq(<<-EOS.gsub(/^\s+\|/, ''))
52-
|Bisect started using options: "" and bisect runner: FakeBisectRunner
52+
|Bisect started using options: "" and bisect runner: "FakeBisectRunner"
5353
|Running suite to find failures... (n.nnnn seconds)
5454
| - Failing examples (2):
5555
| - 2.rb[1:1]
@@ -150,7 +150,7 @@ def find_minimal_repro(output, formatter=Formatters::BisectProgressFormatter, bi
150150
output = normalize_durations(output.string)
151151

152152
expect(output).to eq(<<-EOS.gsub(/^\s+\|/, ''))
153-
|Bisect started using options: "" and bisect runner: FakeBisectRunner
153+
|Bisect started using options: "" and bisect runner: "FakeBisectRunner"
154154
|Running suite to find failures... (n.nnnn seconds)
155155
| - Failing examples (1):
156156
| - 2.rb[1:1]

0 commit comments

Comments
 (0)