Last change
on this file since 351 was 270, checked in by KOBAYASHI, Shinji, 15 years ago |
spec full covered generic id
|
File size:
820 bytes
|
Rev | Line | |
---|
[270] | 1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
| 2 | include OpenEHR::RM::Support::Identification
|
---|
| 3 |
|
---|
| 4 | describe GenericID do
|
---|
| 5 | before(:each) do
|
---|
| 6 | @generic_id = GenericID.new(:value => '791-0245',
|
---|
| 7 | :scheme => 'ZIP')
|
---|
| 8 | end
|
---|
| 9 |
|
---|
| 10 | it 'should be an instance of GenericID' do
|
---|
| 11 | @generic_id.should be_an_instance_of GenericID
|
---|
| 12 | end
|
---|
| 13 |
|
---|
| 14 | it 's value should be 791-0245' do
|
---|
| 15 | @generic_id.value.should == '791-0245'
|
---|
| 16 | end
|
---|
| 17 |
|
---|
| 18 | it 's scheme should be ZIP' do
|
---|
| 19 | @generic_id.scheme.should == 'ZIP'
|
---|
| 20 | end
|
---|
| 21 |
|
---|
| 22 | it 'should raise ArgumentError with nil scheme' do
|
---|
| 23 | lambda {
|
---|
| 24 | @generic_id.scheme = nil
|
---|
| 25 | }.should raise_error ArgumentError
|
---|
| 26 | end
|
---|
| 27 |
|
---|
| 28 | it 'should raise ArgumentError with empty scheme' do
|
---|
| 29 | lambda {
|
---|
| 30 | @generic_id.scheme = ''
|
---|
| 31 | }.should raise_error ArgumentError
|
---|
| 32 | end
|
---|
| 33 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.