Sha256: 7d76adaeb02aeef8b5463b444cabb1b6a52e76ea16c43c70cab2f5193c45e151

Contents?: true

Size: 898 Bytes

Versions: 20

Compression:

Stored size: 898 Bytes

Contents

require File.dirname(__FILE__) + '/../../../../../../spec_helper'
include OpenEHR::RM::DataTypes::Quantity::DateTime

describe DvDate do
  before(:each) do
    @dv_duration = DvDuration.new(:value => 'P1Y2M3W4DT5H6M7.7S')
  end

  it 'is an instance of DvDuration' do
    @dv_duration.should be_an_instance_of DvDuration
  end

  it 'year is 1' do
    @dv_duration.years.should be 1
  end

  it 'months is 2' do
    @dv_duration.months.should be 2
  end

  it 'weeks is 3' do
    @dv_duration.weeks.should be 3
  end

  it 'days is 4' do
    @dv_duration.days.should be 4
  end

  it 'hours should be 5' do
    @dv_duration.hours.should be 5
  end

  it 'minutes should be 6' do
    @dv_duration.minutes.should be 6
  end

  it 'seconds should be 7' do
    @dv_duration.seconds.should be 7
  end

  it 'fractional_second should be 0.7' do
    @dv_duration.fractional_second.should == 0.7
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
openehr-1.2.8 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.2.7 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.2.6 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.2.5 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.2.4 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.2.3 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.2.2 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.2.1 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.2.0 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.1.6 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.1.5 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.1.4 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.1.3 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.1.2 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.1.1 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
openehr-1.1.0 spec/lib/openehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_duration_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/rm/data_types/quantity/date_time/dv_duration_spec.rb