Last change
on this file since 364 was 338, checked in by KOBAYASHI, Shinji, 15 years ago |
test/unit for referece models are replaced to rspec.
|
File size:
1.1 KB
|
Rev | Line | |
---|
[338] | 1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
| 2 | include OpenEHR::RM::Common::Resource
|
---|
| 3 | include OpenEHR::RM::DataTypes::Text
|
---|
| 4 |
|
---|
| 5 | describe 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
|
---|
| 35 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.