Created
November 12, 2019 08:26
-
-
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)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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