Class: RSpec::Core::Formatters::BisectProgressFormatter
- Inherits:
-
BaseTextFormatter
show all
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb
Overview
Produces progress output while bisecting.
Instance Attribute Summary
#example_group, #output
Instance Method Summary
collapse
#close, #dump_failures, #dump_pending, #dump_summary, #message, #seed
#close, #example_group_started, #start
Constructor Details
Returns a new instance of BisectProgressFormatter.
9
10
11
12
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 9
def initialize(output, bisect_runner)
super(output)
@bisect_runner = bisect_runner
end
|
Instance Method Details
#bisect_aborted(notification) ⇒ Object
89
90
91
92
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 89
def bisect_aborted(notification)
output.puts "\n\nBisect aborted!"
output.puts "\nThe most minimal reproduction command discovered so far is:\n #{notification.repro}"
end
|
#bisect_complete(notification) ⇒ Object
74
75
76
77
78
79
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 74
def bisect_complete(notification)
output.puts "\nBisect complete! Reduced necessary non-failing examples " \
"from #{notification.original_non_failing_count} to " \
"#{notification.remaining_count} in " \
"#{Helpers.format_duration(notification.duration)}."
end
|
#bisect_dependency_check_failed(_notification) ⇒ Object
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 36
def bisect_dependency_check_failed(_notification)
output.puts " failure(s) do not require any non-failures to run first"
if @bisect_runner == :fork
output.puts
output.puts "=" * 80
output.puts "NOTE: this bisect run used `config.bisect_runner = :fork`, which generally"
output.puts "provides significantly faster bisection runs than the old shell-based runner,"
output.puts "but may inaccurately report that no non-failures are required. If this result"
output.puts "is unexpected, consider setting `config.bisect_runner = :shell` and trying again."
output.puts "=" * 80
end
end
|
#bisect_dependency_check_passed(_notification) ⇒ Object
32
33
34
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 32
def bisect_dependency_check_passed(_notification)
output.puts " failure appears to be order-dependent"
end
|
#bisect_dependency_check_started(_notification) ⇒ Object
28
29
30
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 28
def bisect_dependency_check_started(_notification)
output.print "Checking that failure(s) are order-dependent.."
end
|
#bisect_failed(notification) ⇒ Object
85
86
87
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 85
def bisect_failed(notification)
output.puts "\nBisect failed! #{notification.failure_explanation}"
end
|
#bisect_individual_run_complete(_) ⇒ Object
70
71
72
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 70
def bisect_individual_run_complete(_)
output.print '.'
end
|
#bisect_original_run_complete(notification) ⇒ Object
20
21
22
23
24
25
26
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 20
def bisect_original_run_complete(notification)
failures = Helpers.pluralize(notification.failed_example_ids.size, "failing example")
non_failures = Helpers.pluralize(notification.non_failing_example_ids.size, "non-failing example")
output.puts " (#{Helpers.format_duration(notification.duration)})"
output.puts "Starting bisect with #{failures} and #{non_failures}."
end
|
#bisect_repro_command(notification) ⇒ Object
81
82
83
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 81
def bisect_repro_command(notification)
output.puts "\nThe minimal reproduction command is:\n #{notification.repro}"
end
|
#bisect_round_detected_multiple_culprits(notification) ⇒ Object
65
66
67
68
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 65
def bisect_round_detected_multiple_culprits(notification)
output.print " multiple culprits detected - splitting candidates"
output.print " (#{Helpers.format_duration(notification.duration)})"
end
|
#bisect_round_ignoring_ids(notification) ⇒ Object
58
59
60
61
62
63
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 58
def bisect_round_ignoring_ids(notification)
range_desc = notification.ignore_range.description
output.print " ignoring #{range_desc}"
output.print " (#{Helpers.format_duration(notification.duration)})"
end
|
#bisect_round_started(notification, include_trailing_space = true) ⇒ Object
50
51
52
53
54
55
56
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 50
def bisect_round_started(notification, include_trailing_space=true)
@round_count += 1
range_desc = notification.candidate_range.description
output.print "\nRound #{@round_count}: bisecting over non-failing #{range_desc}"
output.print " " if include_trailing_space
end
|
#bisect_starting(notification) ⇒ Object
14
15
16
17
18
|
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/formatters/bisect_progress_formatter.rb', line 14
def bisect_starting(notification)
@round_count = 0
output.puts bisect_started_message(notification)
output.print "Running suite to find failures..."
end
|