source: ruby/trunk/spec/lib/open_ehr/rm/common/resource/translation_details_spec.rb@ 369

Last change on this file since 369 was 369, checked in by KOBAYASHI, Shinji, 14 years ago

merge from branches/0.5

File size: 1.1 KB
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEHR::RM::Common::Resource
3include OpenEHR::RM::DataTypes::Text
4
5describe TranslationDetails do
6 before(:each) do
7 language = stub(CodePhrase, :code_string => 'ja')
8 author = Hash['Shinji KOBAYASHI', 'Ehime University']
9 @translation_details =
10 TranslationDetails.new(:language => language,
11 :author => author,
12 :accreditation => 'skoba@moss.gr.jp',
13 :other_details => {'ja', 'Japanese'})
14 end
15
16 it 'should be an instance of TranslationDetails' do
17 @translation_details.should be_an_instance_of TranslationDetails
18 end
19
20 it 'language should be ja' do
21 @translation_details.language.code_string.should == 'ja'
22 end
23
24 it 'authour should be Shinji KOBAYASHI' do
25 @translation_details.author.keys[0].should == 'Shinji KOBAYASHI'
26 end
27
28 it 'accreditation should be skoba@moss.gr.jp' do
29 @translation_details.accreditation.should == 'skoba@moss.gr.jp'
30 end
31
32 it 'other_details should ja, Japanese' do
33 @translation_details.other_details.values[0].should == 'Japanese'
34 end
35end
Note: See TracBrowser for help on using the repository browser.