Ignore:
Timestamp:
Aug 16, 2009, 7:14:16 PM (15 years ago)
Author:
KOBAYASHI, Shinji
Message:

refs #54

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ruby/branches/0.5/spec/lib/open_ehr/rm/data_structures/item_structure/item_table_spec.rb

    r206 r207  
    3232  end
    3333
    34   it 'row count should be 2' do
     34  it 's row count should be 2' do
    3535    @item_table.row_count.should be_equal 2
    3636  end
    3737
    38   it 'column_count should be 3' do
     38  it 's row_count should be 0 when rows are nil' do
     39    @item_table.rows = nil
     40    @item_table.row_count.should be_equal 0
     41  end
     42
     43  it 's column_count should be 3' do
    3944    @item_table.column_count.should be_equal 3
    4045  end
    4146
    42   it 'row_names should be cluster cluster' do
     47
     48  it 's row_names should be cluster cluster' do
    4349    @item_table.row_names.should == %w{cluster cluster}.collect{|n| DvText.new(n)}
    4450  end
     51
     52  it 's row_names should be empty when items are nil' do
     53    @item_table.rows = nil
     54    @item_table.row_names.should == []
     55  end
     56
     57  it 's column_names should one two three' do
     58    @item_table.column_names.should == %w{one two three}.collect{|s| DvText.new(s)}
     59  end
     60
     61  it 's column_names should empty when items aer nil' do
     62    @item_table.rows = nil
     63    @item_table.column_names.should == []
     64  end
     65
     66  it 's ith_row(integer) should be ith row' do
     67    @item_table.ith_row(2).items[1].name.value.should == 'five'
     68  end
     69
     70  it 'should be invalid index under 0' do
     71    lambda {@item_table.ith_row(0) }.should raise_error(ArgumentError)
     72  end
    4573end
Note: See TracChangeset for help on using the changeset viewer.