Sha256: dec5738f5151b99f40272fc0f226557b8d9bf2ba9c16a64ef1c2fbcd56187104

Contents?: true

Size: 1.38 KB

Versions: 26

Compression:

Stored size: 1.38 KB

Contents

require File.dirname(__FILE__) + '/../../../../../../spec_helper'
#require File.dirname(__FILE__) + '/shared_examples_spec'
include OpenEHR::RM::Composition::Content::Entry
include OpenEHR::RM::DataTypes::Text
include OpenEHR::RM::DataStructures::ItemStructure
include OpenEHR::RM::Support::Identification

describe CareEntry do
  let(:language) { double('language',:code_string => 'ja')}
  let(:encoding) { double('encoding', :code_string => 'UTF-8')}
  let(:subject) { double('PartyProxy')}

  before(:each) do
    protocol = stub(ItemStructure, :archetype_node_id => 'at0003')
    guideline_id = stub(ObjectRef, :type => 'care guideline')
    @care_entry = CareEntry.new(:archetype_node_id => 'at0001',
                                :name => DvText.new(:value => 'care entry'),
                                :language => language,
                                :encoding => encoding,
                                :subject => subject,
                                :protocol => protocol,
                                :guideline_id => guideline_id)
  end

  it 'should be an instance of CareEntry' do
    @care_entry.should be_an_instance_of CareEntry
  end

  it 'protocol should be assigned properly' do
    @care_entry.protocol.archetype_node_id.should == 'at0003'
  end

  it 'guideline should be assined properly' do
    @care_entry.guideline_id.type.should == 'care guideline'
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

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