Last change
on this file since 333 was 333, checked in by KOBAYASHI, Shinji, 15 years ago |
Versioning system is complexed
|
File size:
1.3 KB
|
Rev | Line | |
---|
[332] | 1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
[333] | 2 | require File.dirname(__FILE__) + '/shared_examples_spec'
|
---|
[332] | 3 | include OpenEHR::RM::Common::ChangeControl
|
---|
| 4 | include OpenEHR::RM::DataTypes::Text
|
---|
| 5 |
|
---|
| 6 | describe OriginalVersion do
|
---|
[333] | 7 | it_should_behave_like 'change_control'
|
---|
[332] | 8 |
|
---|
| 9 | it 'should be an isntance of OriginalVersion' do
|
---|
| 10 | @original_version.should be_an_instance_of OriginalVersion
|
---|
| 11 | end
|
---|
| 12 |
|
---|
| 13 | it 'attestation size should be 12' do
|
---|
| 14 | @original_version.attestations.size.should == 12
|
---|
| 15 | end
|
---|
| 16 |
|
---|
| 17 | it 'other_version_input_uids size should be 5' do
|
---|
| 18 | @original_version.other_input_version_uids.size.should == 5
|
---|
| 19 | end
|
---|
| 20 |
|
---|
| 21 | it 'is_merged? should be true when other_input_version_uids is nil' do
|
---|
| 22 | @original_version.is_merged?.should be_true
|
---|
| 23 | end
|
---|
| 24 |
|
---|
| 25 | it 'is_merged? should not be true when other_input_version_uids is not nil' do
|
---|
| 26 | @original_version.other_input_version_uids = nil
|
---|
| 27 | @original_version.is_merged?.should be_false
|
---|
| 28 | end
|
---|
| 29 |
|
---|
| 30 | it 'should raise ArgumentError when attestations is nil' do
|
---|
| 31 | lambda {
|
---|
| 32 | @original_version.attestations = nil
|
---|
| 33 | }.should raise_error ArgumentError
|
---|
| 34 | end
|
---|
| 35 |
|
---|
| 36 | it 'should raise ArgumentError when other_input_version_uids is empty' do
|
---|
| 37 | lambda {
|
---|
| 38 | @original_version.other_input_version_uids = Set.new
|
---|
| 39 | }.should raise_error ArgumentError
|
---|
| 40 | end
|
---|
| 41 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.