summaryrefslogtreecommitdiffhomepage
path: root/test/stylesheet/tc_color.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/stylesheet/tc_color.rb')
-rw-r--r--test/stylesheet/tc_color.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/test/stylesheet/tc_color.rb b/test/stylesheet/tc_color.rb
index 46e94f88..336c093f 100644
--- a/test/stylesheet/tc_color.rb
+++ b/test/stylesheet/tc_color.rb
@@ -8,32 +8,33 @@ class TestColor < Test::Unit::TestCase
def teardown; end
def test_initialiation
- assert_equal(@item.auto, nil)
- assert_equal(@item.rgb, "FF000000")
- assert_equal(@item.tint, nil)
+ assert_nil(@item.auto)
+ assert_equal("FF000000", @item.rgb)
+ assert_nil(@item.tint)
end
def test_auto
assert_raise(ArgumentError) { @item.auto = -1 }
assert_nothing_raised { @item.auto = true }
- assert_equal(@item.auto, true)
+ assert(@item.auto)
end
def test_rgb
assert_raise(ArgumentError) { @item.rgb = -1 }
assert_nothing_raised { @item.rgb = "FF00FF00" }
- assert_equal(@item.rgb, "FF00FF00")
+ assert_equal("FF00FF00", @item.rgb)
end
def test_rgb_writer_doesnt_mutate_its_argument
my_rgb = 'ff00ff00'
@item.rgb = my_rgb
+
assert_equal 'ff00ff00', my_rgb
end
def test_tint
assert_raise(ArgumentError) { @item.tint = -1 }
assert_nothing_raised { @item.tint = -1.0 }
- assert_equal(@item.tint, -1.0)
+ assert_in_delta(@item.tint, -1.0)
end
end