diff options
| author | Randy Morgan <[email protected]> | 2012-03-23 23:51:22 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-03-23 23:51:22 +0900 |
| commit | 98c420f1810add2411a9bdeca0947f3a7515ab8b (patch) | |
| tree | ee4c59faddfbcae25e34ce087db6283bef54131a | |
| parent | af4c403f2e291ff68aef10e494e20d76ecebdaa3 (diff) | |
| download | caxlsx-98c420f1810add2411a9bdeca0947f3a7515ab8b.tar.gz caxlsx-98c420f1810add2411a9bdeca0947f3a7515ab8b.zip | |
move table spec inside of worksheet folder to keep in line with gem lib structure
| -rw-r--r-- | test/workbook/worksheet/table/tc_table.rb (renamed from test/table/tc_table.rb) | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/test/table/tc_table.rb b/test/workbook/worksheet/table/tc_table.rb index d6bc95d0..fc29bf66 100644 --- a/test/table/tc_table.rb +++ b/test/workbook/worksheet/table/tc_table.rb @@ -1,11 +1,10 @@ -require 'test/unit' -require 'axlsx.rb' +require 'tc_helper.rb' class TestTable < Test::Unit::TestCase - def setup + def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet - 40.times do + 40.times do @ws << ["aa","aa","aa","aa","aa","aa"] end end @@ -13,7 +12,7 @@ class TestTable < Test::Unit::TestCase def test_initialization assert(@ws.workbook.tables.empty?) assert(@ws.tables.empty?) - + end def test_add_table @@ -25,13 +24,13 @@ class TestTable < Test::Unit::TestCase assert_equal(table.name, name, "options for name are applied") end - + def test_charts assert(@ws.drawing.charts.empty?) chart = @ws.add_chart(Axlsx::Pie3DChart, :title=>"bob", :start_at=>[0,0], :end_at=>[1,1]) assert_equal(@ws.drawing.charts.last, chart, "add chart is returned") chart = @ws.add_chart(Axlsx::Pie3DChart, :title=>"nancy", :start_at=>[1,5], :end_at=>[5,10]) - assert_equal(@ws.drawing.charts.last, chart, "add chart is returned") + assert_equal(@ws.drawing.charts.last, chart, "add chart is returned") end def test_pn @@ -43,7 +42,7 @@ class TestTable < Test::Unit::TestCase table = @ws.add_table("A1:D5") assert_equal(@ws.tables.first.rId, "rId1") end - + def test_index table = @ws.add_table("A1:D5") assert_equal(@ws.tables.first.index, @ws.workbook.tables.index(@ws.tables.first)) |
