Line | |
---|
1 | require File.dirname(__FILE__) + '/../../../../../../spec_helper'
|
---|
2 | include OpenEHR::RM::DataStructures::ItemStructure::Representation
|
---|
3 | include OpenEHR::RM::DataTypes::Text
|
---|
4 |
|
---|
5 | describe Cluster do
|
---|
6 | before(:each) do
|
---|
7 | item = stub(Item)
|
---|
8 | @cluster = Cluster.new(:archetype_node_id => 'at0001',
|
---|
9 | :name => DvText.new(:value => 'cluster'),
|
---|
10 | :items => [item, item])
|
---|
11 | end
|
---|
12 |
|
---|
13 | it 'should be an isntance of Cluster' do
|
---|
14 | @cluster.should be_an_instance_of Cluster
|
---|
15 | end
|
---|
16 |
|
---|
17 | it 'item size should be 2' do
|
---|
18 | @cluster.items.size.should == 2
|
---|
19 | end
|
---|
20 |
|
---|
21 | it 'should raise ArgumentError with empty items' do
|
---|
22 | lambda {
|
---|
23 | @cluster.items = []
|
---|
24 | }.should raise_error ArgumentError
|
---|
25 | end
|
---|
26 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.