Changeset 279 for ruby


Ignore:
Timestamp:
Sep 18, 2009, 4:44:40 PM (15 years ago)
Author:
KOBAYASHI, Shinji
Message:

support/identification package completely move to rspec

Location:
ruby/branches/0.5
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/lib/open_ehr/rm/support/identification.rb

    r278 r279  
    255255          end
    256256
     257          def value
     258            return @object_id.value + '::' +
     259              @creating_system_id.value + '::' +
     260              @version_tree_id.value
     261          end
     262
    257263          def object_id=(object_id)
    258264            raise ArgumentError, 'object_id is mandatory' if object_id.nil?
     
    280286
    281287        class LocatableRef < ObjectRef
    282           attr_reader :namespace, :type, :id, :path
    283 
    284           def initialize(namespace, type, id, path)
    285             super(namespace, type, id)
    286             self.path = path
     288          attr_reader :path
     289
     290          def initialize(args = {})
     291            super(args)
     292            self.path = args[:path]
    287293          end
    288294
  • ruby/branches/0.5/spec/lib/open_ehr/rm/support/identification/object_ref_spec.rb

    r275 r279  
    88                                :namespace => 'local',
    99                                :type => 'PARTY')
     10  end
     11
     12  it 'id.value should deadbeefbabe' do
     13    @object_ref.id.value.should == 'deadbeefbabe'
    1014  end
    1115
  • ruby/branches/0.5/spec/lib/open_ehr/rm/support/identification/object_version_id_spec.rb

    r278 r279  
    1010  it 'should be an instance of ObjectVersionID' do
    1111    @object_version_id.should be_an_instance_of ObjectVersionID
     12  end
     13
     14  it 'value should be F7C5C7B7-75DB-4b39-9A1E-C0BA9BFDBDEC::87284370-2D4B-4e3d-A3F3-F303D2F4F34B::2' do
     15    @object_version_id.value.should == 'F7C5C7B7-75DB-4b39-9A1E-C0BA9BFDBDEC::87284370-2D4B-4e3d-A3F3-F303D2F4F34B::2'
    1216  end
    1317
Note: See TracChangeset for help on using the changeset viewer.