test/drawing/tc_view_3D.rb in axlsx-1.0.18 vs test/drawing/tc_view_3D.rb in axlsx-1.1.0

- old
+ new

@@ -1,26 +1,25 @@ -require 'test/unit' -require 'axlsx.rb' +require 'tc_helper.rb' class TestView3D < Test::Unit::TestCase - def setup + def setup @view = Axlsx::View3D.new end def teardown end - + def test_options v = Axlsx::View3D.new :rotX => 10, :rotY => 5, :hPercent => "30%", :depthPercent => "45%", :rAngAx => false, :perspective => 10 assert_equal(v.rotX, 10) assert_equal(v.rotY, 5) assert_equal(v.hPercent, "30%") assert_equal(v.depthPercent, "45%") assert_equal(v.rAngAx, false) assert_equal(v.perspective, 10) end - + def test_rotX assert_raise(ArgumentError) {@view.rotX = "bob"} assert_nothing_raised {@view.rotX = -90} end @@ -42,14 +41,14 @@ def test_rAngAx assert_raise(ArgumentError) {@view.rAngAx = "bob"} assert_nothing_raised {@view.rAngAx = true} end - + def test_perspective assert_raise(ArgumentError) {@view.perspective = "bob"} assert_nothing_raised {@view.perspective = 30} end - + end