Sha256: 1567279cb7f3d61498b936d95a9ea7434a3e5523ee2f2aa1036dc8ebb48bec79

Contents?: true

Size: 1.27 KB

Versions: 19

Compression:

Stored size: 1.27 KB

Contents

# -*- coding: utf-8 -*-
# ticket 190
require File.dirname(__FILE__) + '/../../../spec_helper'
require File.dirname(__FILE__) + '/parser_spec_helper'

describe ADLParser do
  context 'Unicode support spec' do
    before(:all) do
      @archetype = adl14_archetype('adl-test-entry.unicode_support.test.adl')
    end

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

    context 'parsing Chineze' do
      before(:all) do
        @chineze_term = @archetype.ontology.term_definition(lang: 'zh',
                                                           code: 'at0000')
      end

      it 'text is 概念' do
        @chineze_term.items['text'].should == "概念"
      end

      it 'description is 描述' do
        @chineze_term.items['description'].should == "描述"
      end
    end

    context 'parsing Swedish' do
      before(:all) do
        @swedish_term = @archetype.ontology.term_definition(lang: 'sv',
                                                            code: 'at0000')
      end

      it 'text is språk' do
        @swedish_term.items['text'].should == "språk"
      end

      it 'description is Hj\u00e4lp' do
        @swedish_term.items['description'].should == "Hjälp"
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 2 rubygems

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