Sha256: 01dad162da140d0d32fadf81e4fc69a0702a61e5a51dc5977f7212af9b453371
Contents?: true
Size: 975 Bytes
Versions: 11
Compression:
Stored size: 975 Bytes
Contents
require 'tc_helper.rb' class TestCatAxis < Test::Unit::TestCase def setup @axis = Axlsx::CatAxis.new 12345, 54321 end def teardown end def test_initialization assert_equal(@axis.auto, 1, "axis auto default incorrect") assert_equal(@axis.lblAlgn, :ctr, "label align default incorrect") assert_equal(@axis.lblOffset, "100", "label offset default incorrect") end def test_auto assert_raise(ArgumentError, "requires valid auto") { @axis.auto = :nowhere } assert_nothing_raised("accepts valid auto") { @axis.auto = false } end def test_lblAlgn assert_raise(ArgumentError, "requires valid label alignment") { @axis.lblAlgn = :nowhere } assert_nothing_raised("accepts valid label alignment") { @axis.lblAlgn = :r } end def test_lblOffset assert_raise(ArgumentError, "requires valid label offset") { @axis.lblOffset = 'foo' } assert_nothing_raised("accepts valid label offset") { @axis.lblOffset = "20" } end end
Version data entries
11 entries across 11 versions & 1 rubygems