Last change
on this file since 351 was 279, checked in by KOBAYASHI, Shinji, 15 years ago |
support/identification package completely move to rspec
|
File size:
890 bytes
|
Line | |
---|
1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
2 | include OpenEHR::RM::Support::Identification
|
---|
3 |
|
---|
4 | describe 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 'id.value should deadbeefbabe' do
|
---|
13 | @object_ref.id.value.should == 'deadbeefbabe'
|
---|
14 | end
|
---|
15 |
|
---|
16 | it 'should be an isntance of ObjectRef' do
|
---|
17 | @object_ref.should be_an_instance_of ObjectRef
|
---|
18 | end
|
---|
19 |
|
---|
20 | it 'namespace should be local' do
|
---|
21 | @object_ref.namespace.should == 'local'
|
---|
22 | end
|
---|
23 |
|
---|
24 | it 'type should be PARTY' do
|
---|
25 | @object_ref.type.should == 'PARTY'
|
---|
26 | end
|
---|
27 |
|
---|
28 | it 'should raise ArgumentError with invalid namespace' do
|
---|
29 | lambda {
|
---|
30 | @object_ref.namespace = 'a****'
|
---|
31 | }.should raise_error ArgumentError
|
---|
32 | end
|
---|
33 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.