Sha256: ec4507e4d81a12d557e08c3a7abe228c6f38ce651a10a4e0234809bcd61dc8d3

Contents?: true

Size: 1.31 KB

Versions: 26

Compression:

Stored size: 1.31 KB

Contents

require File.dirname(__FILE__) + '/../../../../spec_helper'
include OpenEHR::RM::EHR
include OpenEHR::RM::Composition
include OpenEHR::RM::Common::ChangeControl
include OpenEHR::RM::DataTypes::Text
include OpenEHR::RM::DataTypes::Quantity::DateTime

describe VersionedComposition do
  before(:each) do
    composition1 = stub(Composition, :archetype_node_id => 'at0002',
                        :is_persistent? => true)
    version1 = stub(Version, :data => composition1)
    composition2 = stub(Composition, :archetype_node_id => 'at0002',
                        :is_persistent? => false)
    version2 = stub(Version, :data => composition2)
    uid = HierObjectID.new(:value => 'opeehr.jp::350')
    owner_id = stub(ObjectRef, :type => 'EHR')
    time_created = DvDateTime.new(:value => '2009-11-16T15:14:33')
    @versioned_composition = 
      VersionedComposition.new(:uid => uid,
                               :owner_id => owner_id,
                               :time_created => time_created,
                               :all_versions => [version1, version2])
  end

  it 'should be an instance of VersionedComposition' do
    @versioned_composition.should be_an_instance_of VersionedComposition
  end

  it 'is_persistent? should be evaluated by first version' do
    @versioned_composition.is_persistent?.should be_true
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

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