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

Commit c002258

Browse files
committed
Rename attribute.
The “in execution order” part isn’t actually important for how we are using it, and makes the name unnecessarily long.
1 parent 5981247 commit c002258

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

lib/rspec/core/bisect/example_minimizer.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Bisect
77
# Contains the core bisect logic. Searches for examples we can ignore by
88
# repeatedly running different subsets of the suite.
99
class ExampleMinimizer
10-
attr_reader :runner, :reporter, :all_example_ids_in_execution_order, :failed_example_ids
10+
attr_reader :runner, :reporter, :all_example_ids, :failed_example_ids
1111

1212
def initialize(runner, reporter)
1313
@runner = runner
@@ -17,7 +17,7 @@ def initialize(runner, reporter)
1717
def find_minimal_repro
1818
prep
1919

20-
remaining_ids = all_example_ids_in_execution_order - failed_example_ids
20+
remaining_ids = all_example_ids - failed_example_ids
2121
debug 0, "Initial failed_example_ids: #{failed_example_ids}"
2222
debug 0, "Initial remaining_ids: #{remaining_ids}"
2323

@@ -41,8 +41,8 @@ def prep
4141
notify(:bisect_starting, :original_cli_args => runner.original_cli_args)
4242

4343
_, duration = track_duration do
44-
original_results = runner.original_results
45-
@all_example_ids_in_execution_order = original_results.all_example_ids_in_execution_order
44+
original_results = runner.original_results
45+
@all_example_ids = original_results.all_example_ids
4646
@failed_example_ids = original_results.failed_example_ids
4747
end
4848

@@ -52,7 +52,7 @@ def prep
5252
end
5353

5454
def non_failing_example_ids
55-
@non_failing_example_ids ||= all_example_ids_in_execution_order - failed_example_ids
55+
@non_failing_example_ids ||= all_example_ids - failed_example_ids
5656
end
5757

5858
def get_same_failures?(ids)

lib/rspec/core/formatters/bisect_formatter.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,7 @@ def start_dump(_notification)
5151
)
5252
end
5353

54-
RunResults = Struct.new(:all_example_ids_in_execution_order,
55-
:failed_example_ids)
54+
RunResults = Struct.new(:all_example_ids, :failed_example_ids)
5655

5756
private
5857

spec/rspec/core/bisect/server_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def run_formatter_specs
4949
end
5050

5151
expect(results).to have_attributes(
52-
:all_example_ids_in_execution_order => %w[
52+
:all_example_ids => %w[
5353
./spec/rspec/core/resources/formatter_specs.rb[1:1]
5454
./spec/rspec/core/resources/formatter_specs.rb[2:1:1]
5555
./spec/rspec/core/resources/formatter_specs.rb[2:2:1]
@@ -73,7 +73,7 @@ def run_formatter_specs
7373
end
7474

7575
expect(results).to have_attributes(
76-
:all_example_ids_in_execution_order => %w[
76+
:all_example_ids => %w[
7777
./spec/rspec/core/resources/formatter_specs.rb[1:1]
7878
./spec/rspec/core/resources/formatter_specs.rb[2:1:1]
7979
./spec/rspec/core/resources/formatter_specs.rb[2:2:1]

0 commit comments

Comments
 (0)