Sha256: 99985e5537c02382edc06c0526c6637cc104ecf7278e30a993955cba65ea27e3

Contents?: true

Size: 706 Bytes

Versions: 1

Compression:

Stored size: 706 Bytes

Contents

require 'cucumber/formatter/progress'

module Fivemat
  class Cucumber < ::Cucumber::Formatter::Progress
    def label(feature)
      feature.short_name
    end

    def before_feature(feature)
      @io.print "#{label(feature)} "
      @io.flush
      @exceptions = []
    end

    def after_feature(feature)
      @io.puts
      @exceptions.each do |(exception, status)|
        print_exception(exception, status, 2)
      end
    end

    def exception(exception, status)
      @exceptions << [exception, status]
      super
    end

    def after_features(features)
      @io.puts
      print_stats(features, @options)
      print_snippets(@options)
      print_passing_wip(@options)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fivemat-1.1.0 lib/fivemat/cucumber.rb