class RSpec::Core::Formatters::DeprecationFormatter
def deprecation(data)
def deprecation(data) return if @seen_deprecations.include?(data) @count += 1 printer.print_deprecation_message data @seen_deprecations << data end
def deprecation_message_for(data)
def deprecation_message_for(data) if data[:message] SpecifiedDeprecationMessage.new(data) else GeneratedDeprecationMessage.new(data) end end
def deprecation_summary
def deprecation_summary printer.deprecation_summary end
def initialize(deprecation_stream, summary_stream)
def initialize(deprecation_stream, summary_stream) @deprecation_stream = deprecation_stream @summary_stream = summary_stream @seen_deprecations = Set.new @count = 0 end
def printer
def printer @printer ||= case deprecation_stream when File ImmediatePrinter.new(FileStream.new(deprecation_stream), summary_stream, self) when RaiseErrorStream ImmediatePrinter.new(deprecation_stream, summary_stream, self) else DelayedPrinter.new(deprecation_stream, summary_stream, self) end end
def start(example_count=nil)
def start(example_count=nil) #no-op to fix #966 end