Sha256: d43ebc90e169b5931d3ce8f8bfa45d7234fd384d702a29339223f6e28df701cb

Contents?: true

Size: 302 Bytes

Versions: 24

Compression:

Stored size: 302 Bytes

Contents

require 'spec_helper'

describe Infobar::Duration do
  it 'can convert duration into string' do
    expect(described_class.new(3661).to_s).to eq '01:01:01'
  end

  it 'can convert duration into string for format' do
    expect(described_class.new(3661, format: '%h:%m').to_s).to eq '01:01'
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
infobar-0.8.1 spec/infobar/duration_spec.rb
infobar-0.8.0 spec/infobar/duration_spec.rb
infobar-0.7.4 spec/infobar/duration_spec.rb
infobar-0.7.2 spec/infobar/duration_spec.rb
infobar-0.7.1 spec/infobar/duration_spec.rb
infobar-0.7.0 spec/infobar/duration_spec.rb
infobar-0.6.2 spec/infobar/duration_spec.rb
infobar-0.6.1 spec/infobar/duration_spec.rb
infobar-0.6.0 spec/infobar/duration_spec.rb
infobar-0.5.1 spec/infobar/duration_spec.rb
infobar-0.5.0 spec/infobar/duration_spec.rb
infobar-0.4.0 spec/infobar/duration_spec.rb
infobar-0.3.0 spec/infobar/duration_spec.rb
infobar-0.2.0 spec/infobar/duration_spec.rb
infobar-0.1.1 spec/infobar/duration_spec.rb
infobar-0.1.0 spec/infobar/duration_spec.rb
infobar-0.0.7 spec/infobar/duration_spec.rb
infobar-0.0.6 spec/infobar/duration_spec.rb
infobar-0.0.5 spec/infobar/duration_spec.rb
infobar-0.0.4 spec/infobar/duration_spec.rb