class RSpec::Core::Formatters::BisectProgressFormatter

@private Produces progress output while bisecting.

Public Instance Methods

bisect_aborted(notification) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 84
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) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 69
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) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 41
def bisect_dependency_check_failed(_notification)
  output.puts " failure(s) do not require any non-failures to run first"
end
bisect_dependency_check_passed(_notification) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 37
def bisect_dependency_check_passed(_notification)
  output.puts " failure appears to be order-dependent"
end
bisect_dependency_check_started(_notification) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 33
def bisect_dependency_check_started(_notification)
  output.print "Checking that failure(s) are order-dependent.."
end
bisect_failed(notification) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 80
def bisect_failed(notification)
  output.puts "\nBisect failed! #{notification.failure_explanation}"
end
bisect_individual_run_complete(_) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 65
def bisect_individual_run_complete(_)
  output.print '.'
end
bisect_original_run_complete(notification) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 25
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) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 76
def bisect_repro_command(notification)
  output.puts "\nThe minimal reproduction command is:\n  #{notification.repro}"
end
bisect_round_detected_multiple_culprits(notification) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 60
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) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 53
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) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 45
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) click to toggle source
# File lib/rspec/core/formatters/bisect_progress_formatter.rb, line 18
def bisect_starting(notification)
  @round_count = 0
  options = notification.original_cli_args.join(' ')
  output.puts "Bisect started using options: #{options.inspect}"
  output.print "Running suite to find failures..."
end