Changeset 333 for ruby/branches/0.5
- Timestamp:
- Nov 6, 2009, 6:55:08 PM (14 years ago)
- Location:
- ruby/branches/0.5
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/branches/0.5/lib/open_ehr/rm/common/change_control.rb
r332 r333 122 122 :contribution => args[:contribution], 123 123 :lifecycle_state => @item.lifecycle_state, 124 :signature => args[:signature]) 125 124 :signature => args[:signature]) 126 125 end 127 126 -
ruby/branches/0.5/spec/lib/open_ehr/rm/common/change_control/original_version_spec.rb
r332 r333 1 1 require File.dirname(__FILE__) + '/../../../../../spec_helper' 2 require File.dirname(__FILE__) + '/shared_examples_spec' 2 3 include OpenEHR::RM::Common::ChangeControl 3 4 include OpenEHR::RM::DataTypes::Text 4 5 5 6 describe OriginalVersion do 6 before(:each) do 7 uid = ObjectVersionID.new(:value => 'ABC::DEF::1') 8 defining_code = stub(CodePhrase, :code_string => '532') 9 lifecycle_state = stub(DvCodedText, :defining_code => defining_code) 10 object_id = stub(ObjectID, :value => 'unique') 11 contribution = ObjectRef.new(:namespace => 'local', 12 :type => 'CONTRIBUTION', 13 :id => object_id) 14 commit_audit = stub(AuditDetails, :committer => 'UNKNOWN', :empty? => false) 15 attestations = stub(Array, :empty? => false, :size => 12) 16 other_input_version_uids = stub(Set, :empty? => false, :size => 5) 17 @original_version = OriginalVersion.new(:uid => uid, 18 :lifecycle_state => lifecycle_state, 19 :attestations => attestations, 20 :commit_audit => commit_audit, 21 :contribution => contribution, 22 :other_input_version_uids => other_input_version_uids) 23 end 7 it_should_behave_like 'change_control' 24 8 25 9 it 'should be an isntance of OriginalVersion' do -
ruby/branches/0.5/spec/lib/open_ehr/rm/common/change_control/version_spec.rb
r332 r333 1 1 require File.dirname(__FILE__) + '/../../../../../spec_helper' 2 require File.dirname(__FILE__) + '/shared_examples_spec' 2 3 include OpenEHR::RM::Common::ChangeControl 3 4 include OpenEHR::RM::Common::Generic … … 5 6 6 7 describe Version do 7 before(:each) do 8 uid = ObjectVersionID.new(:value => 'ABCD::EFG::2') 9 preceding_version_uid = ObjectVersionID.new(:value =>'HIJ::KLM::1') 10 commit_audit = stub(AuditDetails, :committer => 'UNKNOWN', :empty? => false) 11 object_id = stub(ObjectID, :value => 'unique') 12 contribution = ObjectRef.new(:namespace => 'local', 13 :type => 'CONTRIBUTION', 14 :id => object_id) 15 defining_code = stub(CodePhrase, :code_string => '532') 16 lifecycle_state = stub(DvCodedText, :defining_code => defining_code) 17 signature = '4760271533c2866579dde347ad28dd79e4aad933' 18 @version = Version.new(:uid => uid, 19 :preceding_version_uid => preceding_version_uid, 20 :data => 'data', 21 :contribution => contribution, 22 :lifecycle_state => lifecycle_state, 23 :commit_audit => commit_audit, 24 :signature => signature) 25 end 8 it_should_behave_like 'change_control' 26 9 27 10 it 'should be an instance of Version' do
Note:
See TracChangeset
for help on using the changeset viewer.