source: ruby/trunk/spec/lib/open_ehr/rm/composition/content/entry/care_entry_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.2 KB
Line 
1require File.dirname(__FILE__) + '/../../../../../../spec_helper'
2require File.dirname(__FILE__) + '/shared_examples_spec'
3include OpenEHR::RM::Composition::Content::Entry
4include OpenEHR::RM::DataTypes::Text
5include OpenEHR::RM::DataStructures::ItemStructure
6include OpenEHR::RM::Support::Identification
7
8describe CareEntry do
9 it_should_behave_like 'entry'
10
11 before(:each) do
12 protocol = stub(ItemStructure, :archetype_node_id => 'at0003')
13 guideline_id = stub(ObjectRef, :type => 'care guideline')
14 @care_entry = CareEntry.new(:archetype_node_id => 'at0001',
15 :name => DvText.new(:value => 'care entry'),
16 :language => @language,
17 :encoding => @encoding,
18 :subject => @subject,
19 :protocol => protocol,
20 :guideline_id => guideline_id)
21 end
22
23 it 'should be an instance of CareEntry' do
24 @care_entry.should be_an_instance_of CareEntry
25 end
26
27 it 'protocol should be assigned properly' do
28 @care_entry.protocol.archetype_node_id.should == 'at0003'
29 end
30
31 it 'guideline should be assined properly' do
32 @care_entry.guideline_id.type.should == 'care guideline'
33 end
34end
35
Note: See TracBrowser for help on using the repository browser.