@@ -13,7 +13,7 @@ module Formatters
13
13
# @private
14
14
class BisectFormatter
15
15
Formatters . register self , :start , :start_dump , :example_started ,
16
- :example_failed , :example_passed , :example_pending
16
+ :example_failed , :example_finished
17
17
18
18
def initialize ( _output )
19
19
port = RSpec . configuration . drb_port
@@ -35,15 +35,15 @@ def example_started(notification)
35
35
36
36
def example_failed ( notification )
37
37
@failed_example_ids << notification . example . id
38
- example_finished ( notification , :failed )
39
38
end
40
39
41
- def example_passed ( notification )
42
- example_finished ( notification , :passed )
43
- end
40
+ def example_finished ( notification )
41
+ return unless @remaining_failures . include? ( notification . example . id )
42
+ @remaining_failures . delete ( notification . example . id )
44
43
45
- def example_pending ( notification )
46
- example_finished ( notification , :pending )
44
+ status = notification . example . execution_result . status
45
+ return if status == :failed && !@remaining_failures . empty?
46
+ RSpec . world . wants_to_quit = true
47
47
end
48
48
49
49
def start_dump ( _notification )
@@ -53,16 +53,6 @@ def start_dump(_notification)
53
53
end
54
54
55
55
RunResults = Struct . new ( :all_example_ids , :failed_example_ids )
56
-
57
- private
58
-
59
- def example_finished ( notification , status )
60
- return unless @remaining_failures . include? ( notification . example . id )
61
- @remaining_failures . delete ( notification . example . id )
62
-
63
- return if status == :failed && !@remaining_failures . empty?
64
- RSpec . world . wants_to_quit = true
65
- end
66
56
end
67
57
end
68
58
end
0 commit comments