Sha256: ae61c69e2c2f992cb97ccaca95bf012807d0089f0f071c929c2dfccebf658cf5

Contents?: true

Size: 1.16 KB

Versions: 21

Compression:

Stored size: 1.16 KB

Contents

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

describe TranslationDetails do
  before(:each) do
    language = stub(CodePhrase, :code_string => 'ja')
    author = Hash['name', 'Shinji KOBAYASHI']
    @translation_details =
      TranslationDetails.new(:language => language,
                             :author => author,
                             :accreditation => 'Japanese Medical license 333',
                             :other_details => {'ja' => 'Japanese'})
  end

  it 'should be an instance of TranslationDetails' do
    @translation_details.should be_an_instance_of TranslationDetails
  end

  it 'language should be ja' do
    @translation_details.language.code_string.should == 'ja'
  end

  it 'authour should be Shinji KOBAYASHI' do
    @translation_details.author['name'].should == 'Shinji KOBAYASHI'
  end

  it 'accreditation should be skoba@moss.gr.jp' do
    @translation_details.accreditation.should == 'Japanese Medical license 333'
  end

  it 'other_details should ja, Japanese' do
    @translation_details.other_details.values[0].should == 'Japanese'
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

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