source: ruby/trunk/spec/lib/open_ehr/rm/common/directory/folder_spec.rb@ 369

Last change on this file since 369 was 369, checked in by KOBAYASHI, Shinji, 14 years ago

merge from branches/0.5

File size: 733 bytes
Line 
1require File.dirname(__FILE__) + '/../../../../../spec_helper'
2include OpenEHR::RM::Common::Directory
3include OpenEHR::RM::DataTypes::Text
4
5describe Folder do
6 before(:each) do
7 items = stub(Array, :size => 3)
8 folders = stub(Array, :size => 5, :empty? => false)
9 @folder = Folder.new(:archetype_node_id => 'at0001',
10 :name => DvText.new(:value => 'test'),
11 :items => items,
12 :folders => folders)
13 end
14
15 it 'should an instance of Folder' do
16 @folder.should be_an_instance_of Folder
17 end
18
19 it 'items size should be 3' do
20 @folder.items.size.should == 3
21 end
22
23 it 'folders size should be 5' do
24 @folder.folders.size.should == 5
25 end
26end
Note: See TracBrowser for help on using the repository browser.