Changeset 194 for ruby/branches
- Timestamp:
- Aug 13, 2009, 11:16:59 PM (15 years ago)
- Location:
- ruby/branches/0.5
- Files:
-
- 3 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ruby/branches/0.5/lib/open_ehr/rm/data_structures/item_structure.rb
r192 r194 30 30 31 31 class ItemList < ItemStructure 32 attr_accessor :items 33 34 def item_count 35 unless @items.nil? 36 return @items.size 37 else 38 return 0 39 end 40 end 32 41 end 33 42 end # of ItemStructure -
ruby/branches/0.5/spec/lib/openehr/rm/data_structure/item_structure/item_list_spec.rb
r193 r194 10 10 end 11 11 12 it 'should be valid' do 13 @item_list.should_not be_nil 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 14 24 end 15 25 end
Note:
See TracChangeset
for help on using the changeset viewer.