Sha256: 77f9705aca643eb1284821294a22c25c4bc7b923dc9f48be7cc535c518a836d0

Contents?: true

Size: 856 Bytes

Versions: 35

Compression:

Stored size: 856 Bytes

Contents

require 'cucumber/formatter/progress'

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

    def feature_name(keyword, name)
      @io.print "#{name.sub(/^\s*/, '').split("\n").first} "
      @io.flush
    end

    def before_feature(feature)
      @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

35 entries across 35 versions & 6 rubygems

Version Path
logstash-output-scalyr-0.2.1.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.2.0 vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.2.0.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.26.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.25.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.24.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.23.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.22.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.21.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.20.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.19.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.18.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.17.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.16.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.15.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.14.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.13 vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.12 vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.11.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb
logstash-output-scalyr-0.1.10.beta vendor/bundle/jruby/2.5.0/gems/fivemat-1.3.7/lib/fivemat/cucumber.rb