source: ruby/branches/0.5/spec/lib/open_ehr/rm/support/identification/object_ref_spec.rb@ 275

Last change on this file since 275 was 275, checked in by KOBAYASHI, Shinji, 15 years ago

object_ref test/unit move to rspec

File size: 794 bytes
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEHR::RM::Support::Identification
3
4describe ObjectRef do
5 before(:each) do
6 object_id = ObjectID.new(:value => 'deadbeefbabe')
7 @object_ref = ObjectRef.new(:id => object_id,
8 :namespace => 'local',
9 :type => 'PARTY')
10 end
11
12 it 'should be an isntance of ObjectRef' do
13 @object_ref.should be_an_instance_of ObjectRef
14 end
15
16 it 'namespace should be local' do
17 @object_ref.namespace.should == 'local'
18 end
19
20 it 'type should be PARTY' do
21 @object_ref.type.should == 'PARTY'
22 end
23
24 it 'should raise ArgumentError with invalid namespace' do
25 lambda {
26 @object_ref.namespace = 'a****'
27 }.should raise_error ArgumentError
28 end
29end
Note: See TracBrowser for help on using the repository browser.