Sha256: 368586a7900938d320fb64c30a9917e6cc8975f8fdf1eb9be900ade0414a51ad

Contents?: true

Size: 702 Bytes

Versions: 184

Compression:

Stored size: 702 Bytes

Contents

require 'mspec/runner/formatters/dotted'
require 'mspec/runner/actions/tally'

class DescribeFormatter < DottedFormatter
  # Callback for the MSpec :finish event. Prints a summary of
  # the number of errors and failures for each +describe+ block.
  def finish
    describes = Hash.new { |h,k| h[k] = Tally.new }

    @exceptions.each do |exc|
      desc = describes[exc.describe]
      exc.failure? ? desc.failures! : desc.errors!
    end

    print "\n"
    describes.each do |d, t|
      text = d.size > 40 ? "#{d[0,37]}..." : d.ljust(40)
      print "\n#{text} #{t.failure}, #{t.error}"
    end
    print "\n" unless describes.empty?

    print "\n#{@timer.format}\n\n#{@tally.format}\n"
  end
end

Version data entries

184 entries across 160 versions & 4 rubygems

Version Path
rhodes-7.6.0 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-7.5.1 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-7.4.1 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-7.1.17 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-6.2.0 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-6.0.11 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-5.5.18 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-5.5.17 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-5.5.15 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-5.5.0.22 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-5.5.2 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-5.5.0.7 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-5.5.0.3 lib/extensions/mspec/mspec/runner/formatters/describe.rb
rhodes-5.5.0 lib/extensions/mspec/mspec/runner/formatters/describe.rb
tauplatform-1.0.3 lib/extensions/mspec/mspec/runner/formatters/describe.rb
mspec-1.9.1 lib/mspec/runner/formatters/describe.rb
mspec-1.9.0 lib/mspec/runner/formatters/describe.rb
tauplatform-1.0.2 lib/extensions/mspec/mspec/runner/formatters/describe.rb
tauplatform-1.0.1 lib/extensions/mspec/mspec/runner/formatters/describe.rb
mspec-1.8.0 lib/mspec/runner/formatters/describe.rb