test/drawing/tc_title.rb in axlsx-1.0.18 vs test/drawing/tc_title.rb in axlsx-1.1.0
- old
+ new
@@ -1,10 +1,9 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestTitle < Test::Unit::TestCase
- def setup
+ def setup
@p = Axlsx::Package.new
ws = @p.workbook.add_worksheet
@row = ws.add_row ["one", 1, Time.now]
@title = Axlsx::Title.new
@chart = ws.add_chart Axlsx::Bar3DChart
@@ -19,16 +18,16 @@
end
def test_text
assert_raise(ArgumentError, "text must be a string") { @title.text = 123 }
@title.cell = @row.cells.first
- @title.text = "bob"
+ @title.text = "bob"
assert(@title.cell == nil, "setting title with text clears the cell")
end
def test_cell
assert_raise(ArgumentError, "cell must be a Cell") { @title.cell = "123" }
@title.cell = @row.cells.first
assert(@title.text == "one")
end
-
+
end