Created
January 12, 2009 16:57
-
-
Save danlucraft/46057 to your computer and use it in GitHub Desktop.
This file contains 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
module Cucumber | |
module Formatters | |
class FailedFilesFormatter < ProgressFormatter | |
def initialize(step, _1, _2) | |
@bad_files = [] | |
puts "Recording fails in bad_features" | |
@bad_files_io = File.open("bad_features", "w") | |
super(step) | |
end | |
def step_failed(step, regexp, args) | |
unless @bad_files.include? [step.file, step.line] | |
@bad_files << [step.file, step.line] | |
@bad_files_io.print step.file, ":", step.line, " " | |
@bad_files_io.flush | |
end | |
super | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment