Sha256: e07e587ba6cb277accec5ce349463e2623ea55f41c7e5bbce65020b0c71279b7

Contents?: true

Size: 1.12 KB

Versions: 21

Compression:

Stored size: 1.12 KB

Contents

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

describe ADLParser do
  context 'test with slash in comment after use node' do
    before(:all) do
      @archetype = adl14_archetype('adl-test-entry.archetype_internal_ref2.test.adl')
    end

    it 'is an instance of Archetype' do
      @archetype.should be_an_instance_of Archetype
    end

    context 'attribute2' do
      before(:all) do
        @attribute2 = @archetype.definition.attributes[1].children[0]
      end

      it 'is ArchetypeInternalRef' do
        @attribute2.should be_an_instance_of ArchetypeInternalRef
      end

      it 's occurrences upper 2' do
        @attribute2.occurrences.upper.should be 2
      end

      it 's occurrences lower 1' do
        @attribute2.occurrences.lower.should be 1
      end

      it 's path is /attribute2' do
        @attribute2.path.should == '/attribute2'
      end

      it 's target_path is /attribute1' do
        @attribute2.target_path.should == '/attribute1'
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

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