Last change
on this file since 382 was 382, checked in by KOBAYASHI, Shinji, 14 years ago |
refs #74
implemented release 1.0.2
|
File size:
910 bytes
|
Rev | Line | |
---|
[382] | 1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
| 2 | include OpenEHR::AM::Archetype::ConstraintModel
|
---|
| 3 | include OpenEHR::AssumedLibraryTypes
|
---|
| 4 |
|
---|
| 5 | describe ConstraintRef do
|
---|
| 6 | before(:each) do
|
---|
| 7 | occurrences = Interval.new(:lower => 0, :upper => 1)
|
---|
| 8 | @constraint_ref =
|
---|
| 9 | ConstraintRef.new(:path => '/event/[at0001]/',
|
---|
| 10 | :rm_type_name => 'DV_TIME',
|
---|
| 11 | :node_id => 'ac0001',
|
---|
| 12 | :occurrences => occurrences,
|
---|
| 13 | :reference => 'ac0002')
|
---|
| 14 | end
|
---|
| 15 |
|
---|
| 16 | it 'should be an instance of ConstraintRef' do
|
---|
| 17 | @constraint_ref.should be_an_instance_of ConstraintRef
|
---|
| 18 | end
|
---|
| 19 |
|
---|
| 20 | it 'reference should be assigned properly' do
|
---|
| 21 | @constraint_ref.reference.should == 'ac0002'
|
---|
| 22 | end
|
---|
| 23 |
|
---|
| 24 | it 'should raise ArgumentError when reference is nil' do
|
---|
| 25 | lambda {
|
---|
| 26 | @constraint_ref.reference = nil
|
---|
| 27 | }.should raise_error ArgumentError
|
---|
| 28 | end
|
---|
| 29 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.