Sha256: be1056478e3637a17db2313fa258466581ca613266f67cf1a980db1ae9cad2e7

Contents?: true

Size: 357 Bytes

Versions: 8

Compression:

Stored size: 357 Bytes

Contents

require File.expand_path( File.dirname(__FILE__) + '/spec_helper' )

require 'xml'

describe XML, 'converting duration to seconds' do
  it 'converts hours/mins/seconds in combinations' do
    answ = [0.234, 624, 7392.2]
    %w(PT0.234S PT10M24S PT2H3M12.2S).zip(answ) do |string, answ|
      XML.duration_to_seconds(string).should == answ
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mspire-0.4.9 specs/xml_spec.rb
mspire-0.3.0 specs/xml_spec.rb
mspire-0.3.1 specs/xml_spec.rb
mspire-0.3.9 specs/xml_spec.rb
mspire-0.4.4 specs/xml_spec.rb
mspire-0.4.2 specs/xml_spec.rb
mspire-0.4.7 specs/xml_spec.rb
mspire-0.4.5 specs/xml_spec.rb