Sha256: 3d04f2de41446be86b2e4db627161a62c8f93b5a86fd072ebd9b3485c5d72a89

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::Parser

describe ADLParser do
  context 'Language author parsing behavior' do
    before(:all) do
      TARGET_ADL_FILE = 'adl-test-entry.translations_language_author.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 '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_language_author_spec.rb
openehr-1.2.7 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.2.6 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.2.5 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.2.4 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.2.3 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.2.2 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.2.1 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.2.0 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.1.6 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.1.5 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.1.4 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.1.3 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.1.2 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.1.1 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
openehr-1.1.0 spec/lib/openehr/parser/adl_language_translation_language_author_spec.rb
open_ehr-1.0.2 spec/lib/open_ehr/parser/adl_language_translation_language_author_spec.rb
open_ehr-1.0.1 spec/lib/open_ehr/parser/adl_language_translation_language_author_spec.rb
open_ehr-1.0.0 spec/lib/open_ehr/parser/adl_language_translation_language_author_spec.rb
open_ehr-0.9.5 spec/lib/open_ehr/parser/adl_language_translation_language_author_spec.rb