Sha256: ed22f56a6c7de585d0f1110e43afd781fdfbe1b477340c88ba236fc624af11f5

Contents?: true

Size: 505 Bytes

Versions: 13

Compression:

Stored size: 505 Bytes

Contents

module Cucumber
  module Formatter

    class DurationExtractor
      attr_reader :result_duration
      def initialize(result)
        @result_duration = 0
        result.describe_to(self)
      end

      def passed(*) end

      def failed(*) end

      def undefined(*) end

      def skipped(*) end

      def pending(*) end

      def exception(*) end

      def duration(duration, *)
        duration.tap { |duration| @result_duration = duration.nanoseconds / 10**9.0 }
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
cucumber-2.99.0 lib/cucumber/formatter/duration_extractor.rb
mobiusloop-0.1.5 lib/cucumber/formatter/duration_extractor.rb
cucumber-2.4.0 lib/cucumber/formatter/duration_extractor.rb
mobiusloop-0.1.3 lib/cucumber/formatter/duration_extractor.rb
mobiusloop-0.1.2 lib/cucumber/formatter/duration_extractor.rb
cucumber-2.3.3 lib/cucumber/formatter/duration_extractor.rb
cucumber-2.3.2 lib/cucumber/formatter/duration_extractor.rb
cucumber-2.3.1 lib/cucumber/formatter/duration_extractor.rb
cucumber-2.3.0 lib/cucumber/formatter/duration_extractor.rb
cucumber-2.2.0 lib/cucumber/formatter/duration_extractor.rb
cucumber-2.1.0 lib/cucumber/formatter/duration_extractor.rb
cucumber-2.0.2 lib/cucumber/formatter/duration_extractor.rb
cucumber-2.0.1 lib/cucumber/formatter/duration_extractor.rb