source: ruby/branches/0.5/spec/lib/openehr/rm/data_structure/item_structure/item_list_spec.rb@ 194

Last change on this file since 194 was 194, checked in by KOBAYASHI, Shinji, 15 years ago

refs #54

File size: 688 bytes
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEhr::RM::DataStructures::ItemStructure
3include OpenEhr::RM::DataTypes::Text
4
5describe ItemList do
6 before(:each) do
7 item_list_name = DvText.new('item list')
8 @item_list = ItemList.new(:name => item_list_name,
9 :archetype_node_id => 'test')
10 end
11
12 it 'should be instance of ItemList' do
13 @item_list.should be_an_instance_of ItemList
14 end
15
16 it 'count should be 0' do
17 @item_list.item_count.should equal 0
18 end
19
20 it 'count should be change to 3' do
21 dummy_elements = [1,2,3]
22 @item_list.items = dummy_elements
23 @item_list.item_count.should equal 3
24 end
25end
Note: See TracBrowser for help on using the repository browser.