Sha256: a7f54c05351076a4263a147b27234760ba3dd6292f693dfa5fd14268e8a2f180

Contents?: true

Size: 479 Bytes

Versions: 3

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true
require 'spec_helper'
require 'cucumber/formatter/duration'

module Cucumber
  module Formatter
    describe Duration do
      include Duration

      it 'formats ms' do
        expect(format_duration(0.002103)).to eq '0m0.002s'
      end

      it 'formats m' do
        expect(format_duration(61.002503)).to eq'1m1.003s'
      end

      it 'formats h' do
        expect(format_duration(3661.002503)).to eq '61m1.003s'
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cucumber-3.0.1 spec/cucumber/formatter/duration_spec.rb
cucumber-3.0.0 spec/cucumber/formatter/duration_spec.rb
cucumber-3.0.0.pre.2 spec/cucumber/formatter/duration_spec.rb