Rev | Line | |
---|
[355] | 1 | require File.dirname(__FILE__) + '/../../../../../../spec_helper'
|
---|
| 2 | require File.dirname(__FILE__) + '/shared_examples_spec'
|
---|
| 3 | include OpenEHR::RM::Composition::Content::Entry
|
---|
| 4 | include OpenEHR::RM::DataTypes::Text
|
---|
| 5 | include OpenEHR::RM::DataStructures::ItemStructure
|
---|
| 6 | include OpenEHR::RM::Support::Identification
|
---|
| 7 |
|
---|
| 8 | describe 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
|
---|
| 34 | end
|
---|
| 35 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.