Class/Module Index [+]

Quicksearch

RSpec::Core::Formatters::BaseTextFormatter

Base for all of RSpec’s built-in formatters. See RSpec::Core::Formatters::BaseFormatter to learn more about all of the methods called by the reporter.

@see RSpec::Core::Formatters::BaseFormatter @see RSpec::Core::Reporter

Public Instance Methods

close(notification) click to toggle source

@api public

Invoked at the very end, `close` allows the formatter to clean up resources, e.g. open streams, etc.

@param notification [NullNotification]

# File lib/rspec/core/formatters/base_text_formatter.rb, line 68
def close(notification)
  return unless IO === output
  return if output.closed? || output == $stdout

  output.close
end
dump_failures(notification) click to toggle source

@method dump_failures @api public

Dumps detailed information about each example failure.

@param notification [NullNotification]

# File lib/rspec/core/formatters/base_text_formatter.rb, line 33
def dump_failures(notification)
  return if notification.failure_notifications.empty?
  output.puts notification.fully_formatted_failed_examples
end
dump_pending(notification) click to toggle source

@private

# File lib/rspec/core/formatters/base_text_formatter.rb, line 51
def dump_pending(notification)
  return if notification.pending_examples.empty?
  output.puts notification.fully_formatted_pending_examples
end
dump_summary(summary) click to toggle source

@method dump_summary @api public

This method is invoked after the dumping of examples and failures. Each parameter is assigned to a corresponding attribute.

@param summary [SummaryNotification] containing duration, example_count,

failure_count and pending_count
# File lib/rspec/core/formatters/base_text_formatter.rb, line 46
def dump_summary(summary)
  output.puts summary.fully_formatted
end
message(notification) click to toggle source

@method message @api public

Used by the reporter to send messages to the output stream.

@param notification [MessageNotification] containing message

# File lib/rspec/core/formatters/base_text_formatter.rb, line 23
def message(notification)
  output.puts notification.message
end
seed(notification) click to toggle source

@private

# File lib/rspec/core/formatters/base_text_formatter.rb, line 57
def seed(notification)
  return unless notification.seed_used?
  output.puts notification.fully_formatted
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.