Sha256: c6c2a2c7b96707acf9a66848fd1e2e3323ccdf94a573d45d225f2ca7bb3163b3

Contents?: true

Size: 1.19 KB

Versions: 21

Compression:

Stored size: 1.19 KB

Contents

require File.dirname(__FILE__) + '/../../../spec_helper'
require File.dirname(__FILE__) + '/parser_spec_helper'
include OpenEHR::Parser

describe ADLParser do
  context 'Language author parsing behavior' do
    before(:all) do
      target_adl_file = 'adl-test-entry.translations_author_language.test.adl'
      ap = ADLParser.new(ADL14DIR + target_adl_file)
      archetype = ap.parse
      @translations = archetype.translations
    end

    it 'translations exists' do
      @translations.should_not be_nil
    end

    context 'German translation' do
      before(:all) do
        @de = @translations['de']
      end

      it 'exists' do
        @de.should_not be_nil
      end

      it 'language code string is de' do
        @de.language.code_string.should == 'de'
      end

      context 'author' do
        before(:all) do
          @author = @de.author
        end

        it 'exists' do
          @author.should_not be_nil
        end

        it 'name is Harry Potter' do
          @author['name'].should == 'Harry Potter'
        end

        it 'email is harry@something.somewhere.co.uk' do
          @author['email'].should == 'harry@something.somewhere.co.uk'
        end
      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_language_translation_author_language_spec.rb
openehr-1.2.7 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.2.6 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.2.5 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.2.4 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.2.3 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.2.2 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.2.1 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.2.0 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.1.6 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.1.5 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.1.4 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.1.3 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.1.2 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.1.1 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
openehr-1.1.0 spec/lib/openehr/parser/adl_language_translation_author_language_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/parser/adl_language_translation_author_language_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/parser/adl_language_translation_author_language_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/parser/adl_language_translation_author_language_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/parser/adl_language_translation_author_language_spec.rb