Sha256: 72eb6c7c05a5090eddeb246d1c6384a50294588e4e25cbb1b72822a00588631d

Contents?: true

Size: 859 Bytes

Versions: 1

Compression:

Stored size: 859 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

1 entries across 1 versions & 1 rubygems

Version Path
caxlsx-3.2.0 test/drawing/tc_ser_axis.rb