Sha256: 17ebe3461d82b70677f1975e04d8590aaaa9639cf59fc84f92a47c4b60c25ffa
Contents?: true
Size: 665 Bytes
Versions: 7
Compression:
Stored size: 665 Bytes
Contents
require 'test/unit' require 'axlsx.rb' class TestRow < Test::Unit::TestCase def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" @row = @ws.add_row end def test_initialize assert(@row.cells.empty?, "no cells by default") assert_equal(@row.worksheet, @ws, "has a reference to the worksheet") end def test_index assert_equal(@row.index, @row.worksheet.rows.index(@row)) end def test_add_cell c = @row.add_cell(1) assert_equal(@row.cells.last, c) end def test_array_to_cells r = @ws.add_row :values=>[1,2,3], :style=>0, :types=>:integer assert_equal(r.cells.size, 3) end end
Version data entries
7 entries across 7 versions & 1 rubygems