Sha256: e9410403cfd6c17bb169fdc15c2605b282ab83e16c35602930e5a6a0f0cb0665
Contents?: true
Size: 841 Bytes
Versions: 6
Compression:
Stored size: 841 Bytes
Contents
require File.dirname(__FILE__) + '/../../../../../../spec_helper' include OpenEHR::RM::DataTypes::Quantity::DateTime describe DvTime do before(:each) do @dv_time = DvTime.new(:value => '11:17:30.2') end it 'should be an instance of DvTime' do @dv_time.should be_an_instance_of DvTime end it 'hour should be 11' do @dv_time.hour.should == 11 end it 'minute should be 17' do @dv_time.minute.should == 17 end it 'second should be 30' do @dv_time.second.should == 30 end it 'fractional_second should be 0.2' do @dv_time.fractional_second.should == 0.2 end it 'magnitude should 40650.2' do @dv_time.magnitude.should == 40650.2 end it 'should be ' do diff_time = DvTime.new(:value => '15:36:48.05') @dv_time.diff(diff_time).value.should =='P0Y0M0W0DT4H19M17.85S' end end
Version data entries
6 entries across 6 versions & 1 rubygems