test/drawing/tc_axis.rb in axlsx-1.0.18 vs test/drawing/tc_axis.rb in axlsx-1.1.0
- old
+ new
@@ -1,10 +1,9 @@
-require 'test/unit'
-require 'axlsx.rb'
+require 'tc_helper.rb'
class TestAxis < Test::Unit::TestCase
- def setup
+ def setup
@axis = Axlsx::Axis.new 12345, 54321
end
def teardown
end
@@ -33,8 +32,13 @@
end
def test_crosses
assert_raise(ArgumentError, "requires valid crosses") { @axis.crosses = 1 }
assert_nothing_raised("accepts valid crosses") { @axis.crosses = :min }
+ end
+
+ def test_gridlines
+ assert_raise(ArgumentError, "requires valid gridlines") { @axis.gridlines = 'alice' }
+ assert_nothing_raised("accepts valid crosses") { @axis.gridlines = false }
end
end