Rev | Line | |
---|
[193] | 1 | require File.dirname(__FILE__) + '/../../../../../spec_helper'
|
---|
| 2 | include OpenEhr::RM::DataStructures::ItemStructure
|
---|
| 3 | include OpenEhr::RM::DataTypes::Text
|
---|
| 4 |
|
---|
| 5 | describe 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 |
|
---|
[194] | 12 | it 'should be instance of ItemList' do
|
---|
| 13 | @item_list.should be_an_instance_of ItemList
|
---|
[193] | 14 | end
|
---|
[194] | 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
|
---|
[193] | 25 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.