Method: RSpec::Core::Notifications::SummaryNotification#colorized_totals_line
- Defined in:
- lib/rspec/core/notifications.rb
permalink #colorized_totals_line(colorizer = ::RSpec::Core::Formatters::ConsoleCodes) ⇒ String
Wraps the results line with colors based on the configured colors for failure, pending, and success. Defaults to red, yellow, green accordingly.
347 348 349 350 351 352 353 354 355 |
# File 'lib/rspec/core/notifications.rb', line 347 def colorized_totals_line(colorizer=::RSpec::Core::Formatters::ConsoleCodes) if failure_count > 0 || errors_outside_of_examples_count > 0 colorizer.wrap(totals_line, RSpec.configuration.failure_color) elsif pending_count > 0 colorizer.wrap(totals_line, RSpec.configuration.pending_color) else colorizer.wrap(totals_line, RSpec.configuration.success_color) end end |