Sha256: a47cc6682e57ea45bed72e580e032a1bb36ed929b37682012da96124fa2b1313

Contents?: true

Size: 985 Bytes

Versions: 26

Compression:

Stored size: 985 Bytes

Contents

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

describe DvQuantified do
  before(:all) do
    @dv_quantified = DvQuantified.new(:magnitude => 1,
                                      :magnitude_status => '=')
  end

  it 'should be an instance of DvQuantified' do
    @dv_quantified.should be_an_instance_of DvQuantified
  end

  it 's magnitude should be 1' do
    @dv_quantified.magnitude.should be_equal 1
  end

  it 's magnitude_status should be =' do
    @dv_quantified.magnitude_status.should == '='
  end

  it 's comparable to other DvQuantified' do
    dv_quantified = DvQuantified.new(:magnitude => 2)
    @dv_quantified.should < dv_quantified
  end

  it 'should raise ArgumentError with invalid magnitude_status' do
    lambda {
      @dv_quantified.magnitude_status = '+'
    }.should raise_error ArgumentError
  end

  it 's accuracy should be unknown' do
    @dv_quantified.should be_accuracy_unknown
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

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