source: ruby/branches/0.5/spec/lib/open_ehr/rm/support/identification/object_id_spec.rb @ 269

Last change on this file since 269 was 269, checked in by KOBAYASHI, Shinji, 11 years ago

spec full covered object id

File size: 581 bytes
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEHR::RM::Support::Identification
3
4describe ObjectID do
5  before(:each) do
6    @object_id = ObjectID.new(:value => '1')
7  end
8
9  it 'should be an instance of ObjectID' do
10    @object_id.should be_an_instance_of ObjectID
11  end
12
13  it 'value should be 1' do
14    @object_id.value.should == '1'
15  end
16
17  it 'should equal with same value' do
18    @object_id.should == ObjectID.new(:value => '1')
19  end
20
21  it 'should_not equal with other value' do
22    @object_id.should_not == ObjectID.new(:value => 'a')
23  end
24end
Note: See TracBrowser for help on using the repository browser.