class RSpec::LegacyFormatters::Adaptor

@see RSpec::Core::Formatters::BaseFormatter
old notifications and translating them to the older formatter.
for the new 3.x implementation. It takes care of registering all the
The ‘LegacyFormatter` is used to wrap older RSpec 2.x style formatters
@private

def close(notification)

Parameters:
  • notification (NullNotification) --

Other tags:
    Api: - public
def close(notification)
  @formatter.close
end

def dump_failures(notification)

Parameters:
  • notification (NullNotification) --

Other tags:
    Api: - public
def dump_failures(notification)
  @formatter.dump_failures
end

def dump_pending(notification)

Parameters:
  • notification (NullNotification) --

Other tags:
    Api: - public
def dump_pending(notification)
  @formatter.dump_pending
end

def dump_profile(notification)

Parameters:
  • notification (NullNotification) --

Other tags:
    Api: - public
def dump_profile(notification)
  @formatter.dump_profile
end

def dump_summary(summary)

Parameters:
  • summary (Core::Notifications::SummaryNotification) --

Other tags:
    Api: - public
def dump_summary(summary)
  @formatter.load_time = summary.load_time if @formatter.respond_to? :load_time
  @formatter.dump_summary summary.duration, summary.example_count, summary.failure_count, summary.pending_count
end

def example_failed(notification)

Parameters:
  • notification (ExampleNotification) -- containing example subclass of `RSpec::Core::Example`

Other tags:
    Api: - public
def example_failed(notification)
  @formatter.example_failed notification.example
end

def example_group_finished(notification)

Parameters:
  • notification (GroupNotification) -- containing example_group subclass of `RSpec::Core::ExampleGroup`

Other tags:
    Api: - public
def example_group_finished(notification)
  @formatter.example_group_finished notification.group
end

def example_group_started(notification)

Parameters:
  • notification (GroupNotification) -- containing example_group subclass of `RSpec::Core::ExampleGroup`

Other tags:
    Api: - public
def example_group_started(notification)
  @formatter.example_group_started notification.group
end

def example_passed(notification)

Parameters:
  • notification (ExampleNotification) -- containing example subclass of `RSpec::Core::Example`

Other tags:
    Api: - public
def example_passed(notification)
  @formatter.example_passed notification.example
end

def example_pending(notification)

Parameters:
  • notification (ExampleNotification) -- containing example subclass of `RSpec::Core::Example`

Other tags:
    Api: - public
def example_pending(notification)
  @formatter.example_pending notification.example
end

def example_started(notification)

Parameters:
  • notification (ExampleNotification) -- containing example subclass of `RSpec::Core::Example`

Other tags:
    Api: - public
def example_started(notification)
  @formatter.example_started notification.example
end

def initialize(formatter_class, *args)

Parameters:
  • args (Array) -- arguments for the formatter, (usually IO but don't have to be)
  • formatter_class (Class) -- formatter class to build

Other tags:
    Api: - public
def initialize(formatter_class, *args)
  @formatter = formatter_class.new(*args)
end

def message(notification)

Parameters:
  • notification (MessageNotification) -- containing message

Other tags:
    Api: - public
def message(notification)
  @formatter.message notification.message
end

def notifications

Returns:
  • (Array) - notifications the legacy formatter implements

Other tags:
    Api: - public
def notifications
  @notifications ||= NOTIFICATIONS.select { |m| @formatter.respond_to? m }
end

def output

Other tags:
    Api: - private
def output
  formatter.output
end

def seed(notification)

Parameters:
  • notification (SeedNotification) -- containing the seed

Other tags:
    Api: - public
def seed(notification)
  @formatter.seed notification.seed
end

def start(notification)

Parameters:
  • notification (NullNotification) --

Other tags:
    Api: - public
def start(notification)
  @formatter.start notification.count
end

def start_dump(notification)

Parameters:
  • notification (NullNotification) --

Other tags:
    Api: - public
def start_dump(notification)
  @formatter.start_dump
end

def stop(notification)

Parameters:
  • notification (NullNotification) --

Other tags:
    Api: - public
def stop(notification)
  @formatter.stop
end