Sha256: 6cae7c5b80af6f946d8559c8b769902766ac1ac150443c7cfcb59a12e8395149

Contents?: true

Size: 1.17 KB

Versions: 26

Compression:

Stored size: 1.17 KB

Contents

require File.dirname(__FILE__) + '/../../../../../spec_helper'
include OpenEHR::AM::Archetype::ConstraintModel
include OpenEHR::AssumedLibraryTypes

describe ArchetypeInternalRef do
  before(:each) do
    occurrences = Interval.new(:lower => 0, :upper => 1)
    @archetype_internal_ref =
      ArchetypeInternalRef.new(:path => '/event/[at0001]/',
                               :rm_type_name => 'DV_TIME',
                               :node_id => 'ac0001',
                               :occurrences => occurrences,
                               :target_path => '/data/[at0002]')
  end

  it 'should be an instance of ArchetypeInternalRef' do
    @archetype_internal_ref.should be_an_instance_of ArchetypeInternalRef
  end

  it 'target_path should be assigned properly' do
    @archetype_internal_ref.target_path.should == '/data/[at0002]'
  end

  it 'should raise ArgumentError when target_path is nil.' do
    lambda {
      @archetype_internal_ref.target_path = nil
    }.should raise_error ArgumentError
  end

  it 'should raise ArgumentError when target_path is empty.' do
    lambda {
      @archetype_internal_ref.target_path = ''
    }.should raise_error ArgumentError
  end
end
  

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
openehr-1.2.8 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.2.7 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.2.6 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.2.5 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.2.4 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.2.3 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.2.2 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.2.1 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.2.0 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.1.6 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.1.5 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.1.4 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.1.3 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.1.2 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.1.1 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
openehr-1.1.0 spec/lib/openehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/am/archetype/constraint_model/archetype_internal_ref_spec.rb