Skip to content

Instantly share code, notes, and snippets.

@tonymarklove
Created November 12, 2019 08:26
Show Gist options
  • Select an option

  • Save tonymarklove/7c4444e895095159be43d5a233cfdd2f to your computer and use it in GitHub Desktop.

Select an option

Save tonymarklove/7c4444e895095159be43d5a233cfdd2f to your computer and use it in GitHub Desktop.
When bisect isn't working properly get a print out of files in order (--require ./bisect_formatter.rb --format BisectFormatter)
class BisectFormatter < RSpec::Core::Formatters::ProgressFormatter
RSpec::Core::Formatters.register self, :example_started, :example_passed, :example_pending, :example_failed, :start_dump
def initialize(output)
@output = output
@files_processed = {}
end
def example_started(notification)
return if @files_processed.key?(notification.example.file_path)
@files_processed[notification.example.file_path] = true
@output.print notification.example.file_path
@output.print "\n"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment