Method: RSpec::Core::Notifications::ExamplesNotification#fully_formatted_failed_examples

Defined in:
lib/rspec/core/notifications.rb

#fully_formatted_failed_examples(colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ String

Returns The list of failed examples, fully formatted in the way that RSpec's built-in formatters emit.

Returns:

  • (String)

    The list of failed examples, fully formatted in the way that RSpec's built-in formatters emit.



110
111
112
113
114
115
116
117
118
# File 'lib/rspec/core/notifications.rb', line 110

def fully_formatted_failed_examples(colorizer=::RSpec::Core::Formatters::ConsoleCodes)
  formatted = "\nFailures:\n"

  failure_notifications.each_with_index do |failure, index|
    formatted += failure.fully_formatted(index.next, colorizer)
  end

  formatted
end