Sha256: 8070ab81f79b4ec355b1bdff972946a549c60a37ad17f8b7490d56d2ef3fe79e

Contents?: true

Size: 828 Bytes

Versions: 20

Compression:

Stored size: 828 Bytes

Contents

require 'tc_helper.rb'

class TestSerAxis < Test::Unit::TestCase
  def setup
    @axis = Axlsx::SerAxis.new
  end

  def teardown
  end

  def test_options
    a = Axlsx::SerAxis.new(:tick_lbl_skip => 9, :tick_mark_skip => 7)
    assert_equal(a.tick_lbl_skip, 9)
    assert_equal(a.tick_mark_skip, 7)
  end


  def test_tick_lbl_skip
    assert_raise(ArgumentError, "requires valid tick_lbl_skip") { @axis.tick_lbl_skip = -1 }
    assert_nothing_raised("accepts valid tick_lbl_skip") { @axis.tick_lbl_skip = 1 }
    assert_equal(@axis.tick_lbl_skip, 1)
  end


  def test_tick_mark_skip
    assert_raise(ArgumentError, "requires valid tick_mark_skip") { @axis.tick_mark_skip = :my_eyes }
    assert_nothing_raised("accepts valid tick_mark_skip") { @axis.tick_mark_skip = 2 }
    assert_equal(@axis.tick_mark_skip, 2)
  end

end

Version data entries

20 entries across 20 versions & 6 rubygems

Version Path
caxlsx-3.1.1 test/drawing/tc_ser_axis.rb
caxlsx-3.1.0 test/drawing/tc_ser_axis.rb
bonio-axlsx-2.2.3 test/drawing/tc_ser_axis.rb
caxlsx-3.0.4 test/drawing/tc_ser_axis.rb
caxlsx-3.0.3 test/drawing/tc_ser_axis.rb
caxlsx-3.0.2 test/drawing/tc_ser_axis.rb
caxlsx-2.0.2 test/drawing/tc_ser_axis.rb
caxlsx-3.0.1 test/drawing/tc_ser_axis.rb
caxlsx-3.0.0 test/drawing/tc_ser_axis.rb
axlsx-alt-3.0.1 test/drawing/tc_ser_axis.rb
axlsx-alt-3.0.0 test/drawing/tc_ser_axis.rb
axlsx-3.0.0.pre test/drawing/tc_ser_axis.rb
bonio-axlsx-2.2.2 test/drawing/tc_ser_axis.rb
bonio-axlsx-2.2.1 test/drawing/tc_ser_axis.rb
dg-axlsx-2.1.0 test/drawing/tc_ser_axis.rb
axlsx-2.1.0.pre test/drawing/tc_ser_axis.rb
l_axlsx-2.0.1 test/drawing/tc_ser_axis.rb
axlsx-2.0.1 test/drawing/tc_ser_axis.rb
axlsx-2.0.0 test/drawing/tc_ser_axis.rb
axlsx-1.3.6 test/drawing/tc_ser_axis.rb