From 6e8b4b2d638a9128cf79fa5c5897937af1f06c18 Mon Sep 17 00:00:00 2001 From: Randy Morgan Date: Thu, 16 Feb 2012 16:35:22 +0900 Subject: more specs for cell_alignment cell and chart --- test/stylesheet/tc_cell_alignment.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'test/stylesheet') diff --git a/test/stylesheet/tc_cell_alignment.rb b/test/stylesheet/tc_cell_alignment.rb index a0cb4817..66f95518 100644 --- a/test/stylesheet/tc_cell_alignment.rb +++ b/test/stylesheet/tc_cell_alignment.rb @@ -5,8 +5,7 @@ class TestCellAlignment < Test::Unit::TestCase def setup @item = Axlsx::CellAlignment.new end - def teardown - end + def test_initialiation assert_equal(@item.horizontal, nil) assert_equal(@item.vertical, nil) @@ -17,7 +16,13 @@ class TestCellAlignment < Test::Unit::TestCase assert_equal(@item.justifyLastLine, nil) assert_equal(@item.shrinkToFit, nil) assert_equal(@item.readingOrder, nil) - + options = { :horizontal => :left, :vertical => :top, :textRotation => 3, + :wrapText => true, :indent => 2, :relativeIndent => 5, + :justifyLastLine => true, :shrinkToFit => true, :readingOrder => 2 } + ca = Axlsx::CellAlignment.new options + options.each do |key, value| + assert_equal(ca.send(key.to_sym),value) + end end def test_horizontal -- cgit v1.2.3