Creates a new
instance that will write to output. If output is a String, output will be written to the File with
that name, otherwise output is exected to be an IO (or an object
that responds to #puts and #write).
# File lib/spec/runner/formatter/base_text_formatter.rb, line 16
def initialize(options, output)
@options = options
if String === output
FileUtils.mkdir_p(File.dirname(output))
@output = File.open(output, 'w')
else
@output = output
end
@pending_examples = []
end