@@ -16,8 +16,8 @@ module RSpec::Core
16
16
)
17
17
end
18
18
19
- def find_minimal_repro ( output , formatter = Formatters ::BisectProgressFormatter )
20
- Bisect ::Coordinator . bisect_with ( spec_runner , [ ] , formatter . new ( output ) )
19
+ def find_minimal_repro ( output , formatter = Formatters ::BisectProgressFormatter , bisect_runner = :fork )
20
+ Bisect ::Coordinator . bisect_with ( spec_runner , [ ] , formatter . new ( output , bisect_runner ) )
21
21
end
22
22
23
23
it 'notifies the bisect progress formatter of progress and closes the output' do
@@ -99,7 +99,7 @@ def find_minimal_repro(output, formatter=Formatters::BisectProgressFormatter)
99
99
it "detects the independent case and prints the minimal reproduction" do
100
100
fake_bisect_runner . dependent_failures = { }
101
101
output = StringIO . new
102
- find_minimal_repro ( output )
102
+ find_minimal_repro ( output , Formatters :: BisectProgressFormatter , :shell )
103
103
output = normalize_durations ( output . string )
104
104
105
105
expect ( output ) . to eq ( <<-EOS . gsub ( /^\s +\| / , '' ) )
@@ -116,6 +116,33 @@ def find_minimal_repro(output, formatter=Formatters::BisectProgressFormatter)
116
116
EOS
117
117
end
118
118
119
+ it "also indicates that the :fork runner may be at fault when that was used" do
120
+ fake_bisect_runner . dependent_failures = { }
121
+ output = StringIO . new
122
+ find_minimal_repro ( output , Formatters ::BisectProgressFormatter , :fork )
123
+ output = normalize_durations ( output . string )
124
+
125
+ expect ( output ) . to eq ( <<-EOS . gsub ( /^\s +\| / , '' ) )
126
+ |Bisect started using options: ""
127
+ |Running suite to find failures... (n.nnnn seconds)
128
+ |Starting bisect with 1 failing example and 7 non-failing examples.
129
+ |Checking that failure(s) are order-dependent... failure(s) do not require any non-failures to run first
130
+ |
131
+ |================================================================================
132
+ |NOTE: this bisect run used `config.bisect_runner = :fork`, which generally
133
+ |provides significantly faster bisection runs than the old shell-based runner,
134
+ |but may inaccurately report that no non-failures are required. If this result
135
+ |is unexpected, consider setting `config.bisect_runner = :shell` and trying again.
136
+ |================================================================================
137
+ |
138
+ |Bisect complete! Reduced necessary non-failing examples from 7 to 0 in n.nnnn seconds.
139
+ |
140
+ |The minimal reproduction command is:
141
+ | rspec 2.rb[1:1]
142
+
143
+ EOS
144
+ end
145
+
119
146
it "can use the debug formatter for detailed output" do
120
147
fake_bisect_runner . dependent_failures = { }
121
148
output = StringIO . new
0 commit comments