spec/row_spec.rb in rspreadsheet-0.2.3 vs spec/row_spec.rb in rspreadsheet-0.2.4

- old
+ new

@@ -1,11 +1,11 @@ require 'spec_helper' describe Rspreadsheet::Row do before do @sheet1 = Rspreadsheet.new.create_worksheet - @sheet2 = Rspreadsheet.new($test_filename).worksheets[1] + @sheet2 = Rspreadsheet.new($test_filename).worksheets(1) end it 'allows access to cells in a row' do @row = @sheet2.rows(1) @c = @row.cells(1) @c.value = 3 @@ -104,11 +104,11 @@ @sheet1.rows(i).rowi.should == i end end it 'can open ods testfile and read its content' do book = Rspreadsheet.new($test_filename) - s = book.worksheets[1] + s = book.worksheets(1) (1..10).each do |i| s.rows(i).should be_kind_of(Rspreadsheet::Row) s.rows(i).repeated.should == 1 s.rows(i).used_range.size>0 end @@ -166,17 +166,20 @@ @row = @sheet1.rows(16) @row.range.should == (16..19) @row.rowi.should == 16 - @sheet1.insert_row_above(7) + @sheet1.add_row_above(7) @sheet1.rows(17).range.should == (17..20) @row.range.should == (17..20) @row.rowi.should == 17 - @sheet1.rows(17).should equal(@row) + @sheet1.rows(17).should equal(@row) + + @row.add_row_above + @row.rowi.should == 18 end it 'inserted has correct class' do # based on real error - @sheet2.insert_row_above(1) + @sheet2.add_row_above(1) @sheet2.rows(1).should be_kind_of(Rspreadsheet::Row) end it 'can be deleted' do @sheet1[15,4]='data' @row = @sheet1.rows(15)