blob: 4bd8b883cf16d5d18ef75b515af39815d822609e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
require 'test/unit'
require 'axlsx.rb'
class TestValAxis < Test::Unit::TestCase
def setup
@axis = Axlsx::ValAxis.new 12345, 54321
end
def teardown
end
def test_initialization
assert_equal(@axis.crossBetween, :between, "axis crossBetween default incorrect")
end
def test_options
a = Axlsx::ValAxis.new 2345, 4321, :crossBetween => :midCat
assert_equal(a.crossBetween, :midCat)
end
def test_crossBetween
assert_raise(ArgumentError, "requires valid crossBetween") { @axis.crossBetween = :my_eyes }
assert_nothing_raised("accepts valid crossBetween") { @axis.crossBetween = :midCat }
end
end
|