Sha256: eb34e9454e8a11ed202a3a7bfb38c13ee7bc83a904688af8b870274f77846bce

Contents?: true

Size: 844 Bytes

Versions: 14

Compression:

Stored size: 844 Bytes

Contents

require 'cucumber/formatter/progress'

module Fivemat
  class Cucumber < ::Cucumber::Formatter::Progress
    include ElapsedTime

    def label(feature)
      feature.short_name
    end

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

    def after_feature(feature)
      print_elapsed_time @io, @start_time
      @io.puts

      @exceptions.each do |(exception, status)|
        print_exception(exception, status, 2)
      end
    end

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

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

    def done
    end
  end
end

Version data entries

14 entries across 13 versions & 5 rubygems

Version Path
logstash-filter-csharp-0.2.1 vendor/bundle/jruby/2.3.0/gems/fivemat-1.3.3/lib/fivemat/cucumber.rb
logstash-filter-csharp-0.2.0 vendor/bundle/jruby/2.3.0/gems/fivemat-1.3.3/lib/fivemat/cucumber.rb
logstash-output-icinga-1.1.0 vendor/jruby/1.9/gems/fivemat-1.3.3/lib/fivemat/cucumber.rb
logstash-output-icinga-1.1.0 vendor/jruby/2.3.0/gems/fivemat-1.3.3/lib/fivemat/cucumber.rb
logstash-filter-cache-redis-0.3.1 vendor/bundle/jruby/1.9/gems/fivemat-1.3.5/lib/fivemat/cucumber.rb
logstash-filter-cache-redis-0.3.0 vendor/bundle/jruby/1.9/gems/fivemat-1.3.5/lib/fivemat/cucumber.rb
logstash-filter-cache-redis-0.2.0 vendor/bundle/jruby/1.9/gems/fivemat-1.3.5/lib/fivemat/cucumber.rb
logstash-filter-cache-redis-0.1.0 vendor/bundle/jruby/1.9/gems/fivemat-1.3.5/lib/fivemat/cucumber.rb
logstash-filter-csharp-0.1.0 vendor/bundle/jruby/2.3.0/gems/fivemat-1.3.3/lib/fivemat/cucumber.rb
fivemat-1.3.5 lib/fivemat/cucumber.rb
fivemat-1.3.4 lib/fivemat/cucumber.rb
logstash-filter-htmlentities-0.1.0 vendor/bundle/jruby/1.9/gems/fivemat-1.3.3/lib/fivemat/cucumber.rb
logstash-output-icinga-1.0.0 vendor/jruby/1.9/gems/fivemat-1.3.3/lib/fivemat/cucumber.rb
fivemat-1.3.3 lib/fivemat/cucumber.rb