Sha256: 17f270d841d497dcbfcc21969634ee47c2322cd41eae12d6d2b49dd6c161b6f9

Contents?: true

Size: 885 Bytes

Versions: 6

Compression:

Stored size: 885 Bytes

Contents

module ::RSpec::Core::Notifications
  # SummaryNotification is a Struct
  SummaryNotification.class_eval do
    def totals_line
      summary = Formatters::Helpers.pluralize(example_count, "example")
      # 2 string mutations
      summary = summary + ", " + Formatters::Helpers.pluralize(failure_count, "failure")
      # string mutation
      summary = summary + ", #{pending_count} pending" if pending_count > 0
      summary
    end

    def fully_formatted(colorizer=::RSpec::Core::Formatters::ConsoleCodes)
      formatted = "\nFinished in #{formatted_duration} " \
                  "(files took #{formatted_load_time} to load)\n" \
                  "#{colorized_totals_line(colorizer)}\n"

      unless failed_examples.empty?
        # 2 string mutations
        formatted = formatted + colorized_rerun_commands(colorizer) + "\n"
      end

      formatted
    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
opal-rspec-0.6.1 opal/opal/rspec/fixes/rspec/core/notifications/summary_notification.rb
opal-rspec-0.6.0 opal/opal/rspec/fixes/rspec/core/notifications/summary_notification.rb
opal-rspec-0.6.0.beta1 opal/opal/rspec/fixes/rspec/core/notifications/summary_notification.rb
opal-connect-rspec-0.5.0 opal/opal/rspec/fixes/rspec/core/notifications/summary_notification.rb
opal-rspec-0.5.0 opal/opal/rspec/fixes/rspec/core/notifications/summary_notification.rb
opal-rspec-0.5.0.beta3 opal/opal/rspec/fixes/rspec/core/notifications/summary_notification.rb