Sha256: 2a6458d3d954d1515efedf1a03c32e2d94e1f676b1fb59f1dc8c75b04a8a9965

Contents?: true

Size: 1.4 KB

Versions: 19

Compression:

Stored size: 1.4 KB

Contents

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

describe ADLParser do
  context do
    before(:all) do
      archetype = adl14_archetype('adl-test-entry.multi_language.test.adl')
      @ontology = archetype.ontology
    end

    it 'primary language is en' do
      @ontology.primary_language.should == 'en'
    end

    it 'languages available are sv and en' do
      @ontology.languages_available.should == ['en', 'sv']
    end

    context 'term definition' do
      before(:all) do
        @term_def = @ontology.term_definitions
      end

      it 'languages defined are sv and en' do
        @term_def.keys.should == ['en','sv']
      end

      context 'en items' do
        before(:all) do
          @en = @term_def['en']['at0000'].items
        end

        it 'text is most minimal' do
          @en['text'].should == 'most minimal'
        end

        it 'description is most minimal' do
          @en['description'].should == 'most minimal'
        end
      end

      context 'sv items' do
        before(:all) do
          @en = @term_def['sv']['at0000'].items
        end

        it 'text is most minimal' do
          @en['text'].should == 'mesta minimal'
        end

        it 'description is most minimal' do
          @en['description'].should == 'mesta minimal'
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

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