Sha256: 84bd4b9e15e95016b8a7308ce36b461915431aa4f77c119e8f6e968e9bbe7046
Contents?: true
Size: 862 Bytes
Versions: 1
Compression:
Stored size: 862 Bytes
Contents
require 'test/unit' require 'axlsx.rb' class TestCatAxisData < Test::Unit::TestCase def setup p = Axlsx::Package.new @ws = p.workbook.add_worksheet :name=>"hmmm" chart = @ws.drawing.add_chart Axlsx::Bar3DChart, :title => "fishery" @series = chart.add_series :data=>[0,1,2], :labels=>["zero", "one", "two"], :title=>"bob" end def test_initialize assert(@series.data.is_a?Axlsx::SimpleTypedList) assert_equal(@series.data, [0,1,2], "data option applied") end def test_data assert_equal(@series.data, [0,1,2]) end def test_labels assert_equal(@series.labels, ["zero", "one", "two"]) end def test_shape assert_raise(ArgumentError, "require valid shape") { @series.shape = :teardropt } assert_nothing_raised("allow valid shape") { @series.shape = :cone } assert(@series.shape == :cone) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
axlsx-1.0.7 | test/drawing/tc_cat_axis_data.rb~ |