Sha256: b8bfb52bf542ce98ec307e5ad42ce4f3adf87b08fae81651803345690a72979e
Contents?: true
Size: 764 Bytes
Versions: 19
Compression:
Stored size: 764 Bytes
Contents
require 'tc_helper.rb' class TestColor < Test::Unit::TestCase def setup @item = Axlsx::Color.new end def teardown end def test_initialiation assert_equal(@item.auto, nil) assert_equal(@item.rgb, "FF000000") assert_equal(@item.tint, nil) end def test_auto assert_raise(ArgumentError) { @item.auto = -1 } assert_nothing_raised { @item.auto = true } assert_equal(@item.auto, true ) end def test_rgb assert_raise(ArgumentError) { @item.rgb = -1 } assert_nothing_raised { @item.rgb = "FF00FF00" } assert_equal(@item.rgb, "FF00FF00" ) end def test_tint assert_raise(ArgumentError) { @item.tint = -1 } assert_nothing_raised { @item.tint = -1.0 } assert_equal(@item.tint, -1.0 ) end end
Version data entries
19 entries across 19 versions & 1 rubygems