class RSpec::Core::Formatters::DeprecationFormatter::FileStream
Wraps a File object and provides file-specific operations.
@private
def initialize(file)
def initialize(file) @file = file # In one of my test suites, I got lots of duplicate output in the # deprecation file (e.g. 200 of the same deprecation, even though # the `puts` below was only called 6 times). Setting `sync = true` # fixes this (but we really have no idea why!). @file.sync = true end
def puts(*args)
def puts(*args) @file.puts(*args) end
def summarize(summary_stream, deprecation_count)
def summarize(summary_stream, deprecation_count) summary_stream.puts "\n#{Helpers.pluralize(deprecation_count, 'deprecation')} logged to #{@file.path}" puts RAISE_ERROR_CONFIG_NOTICE end