method

dump_summary

Importance_0
dump_summary(duration, example_count, failure_count, pending_count) public

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/runner/formatter/base_text_formatter.rb, line 52
        def dump_summary(duration, example_count, failure_count, pending_count)
          return if dry_run?
          @output.puts
          @output.puts "Finished in #{duration} seconds"
          @output.puts

          summary = "#{example_count} example#{'s' unless example_count == 1}, #{failure_count} failure#{'s' unless failure_count == 1}"
          summary << ", #{pending_count} pending" if pending_count > 0  

          if failure_count == 0
            if pending_count > 0
              @output.puts yellow(summary)
            else
              @output.puts green(summary)
            end
          else
            @output.puts red(summary)
          end
          @output.flush
        end
Register or log in to add new notes.