Line | |
---|
1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
2 | include OpenEHR::AM::Archetype::ConstraintModel
|
---|
3 | include OpenEHR::AM::Archetype::Primitive
|
---|
4 | include OpenEHR::AssumedLibraryTypes
|
---|
5 |
|
---|
6 | describe CPrimitiveObject do
|
---|
7 | before(:each) do
|
---|
8 | interval = Interval.new(:lower => 0, :upper => 1)
|
---|
9 | item = stub(CPrimitive, :node_id => 'at0001')
|
---|
10 | @c_primitive_object = CPrimitiveObject.new(:path => 'event/test',
|
---|
11 | :rm_type_name => 'DV_TEXT',
|
---|
12 | :node_id => 'ac0001',
|
---|
13 | :occurrences => interval,
|
---|
14 | :item => item)
|
---|
15 | end
|
---|
16 |
|
---|
17 | it 'should be an instance of CPrimitiveObject' do
|
---|
18 | @c_primitive_object.should be_an_instance_of CPrimitiveObject
|
---|
19 | end
|
---|
20 |
|
---|
21 | it 'item should be assigned properly' do
|
---|
22 | @c_primitive_object.item.node_id.should == 'at0001'
|
---|
23 | end
|
---|
24 |
|
---|
25 | it 'should allowed any' do
|
---|
26 | @c_primitive_object.should_not be_any_allowed
|
---|
27 | end
|
---|
28 |
|
---|
29 | it 'should not any allowed' do
|
---|
30 | @c_primitive_object.item = nil
|
---|
31 | @c_primitive_object.should be_any_allowed
|
---|
32 | end
|
---|
33 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.