Sha256: 85c1e0f41f7fe2176676fb327fc6f6b3d8aac69953c55bc566d38cf52f536f2f
Contents?: true
Size: 1.45 KB
Versions: 2
Compression:
Stored size: 1.45 KB
Contents
require 'spec_helper' describe Rspreadsheet::Cell do before do book1 = Rspreadsheet.new @sheet1 = book1.create_worksheet book2 = Rspreadsheet.new($test_filename) @sheet2 = book2.worksheets[1] end it 'contains good row and col coordinates' do @cell = @sheet1.cells(1,3) @cell.row.should == 1 @cell.col.should == 3 @cell.coordinates.should == [1,3] @cell = @sheet2.cells(7,2) @cell.row.should == 7 @cell.col.should == 2 @cell.coordinates.should == [7,2] end it 'can be referenced by more vars and both are synchronized' do @cell = @sheet1.cells(1,1) @sheet1[1,1] = 'novinka' @cell.value.should == 'novinka' end it 'can be modified by more ways and all are identical' do @cell = @sheet1.cells(2,2) @sheet1[2,2] = 'zaprve' @cell.value.should == 'zaprve' @sheet1.cells(2,2).value = 'zadruhe' @cell.value.should == 'zadruhe' @sheet1.B2 = 'zatreti' @cell.value.should == 'zatreti' end it 'can include links' do @sheet2.A12.should == '[http://example.org/]' end it 'contains good row and col coordinates even after table:number-columns-repeated cells' do @cell = @sheet2.cells(13,5) @cell.value.should == 'afterrepeated' @cell.row.should == 13 @cell.col.should == 5 end it 'does not accept negative and zero coordinates' do @sheet2.cells(0,5).should be(nil) @sheet2.cells(2,-5).should be(nil) @sheet2.cells(-2,-5).should be(nil) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rspreadsheet-0.1.0 | spec/cell_spec.rb |
rspreadsheet-0.0.6 | spec/cell_spec.rb |