diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-13 13:13:34 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-03 16:05:17 +0200 |
| commit | 350f7ae9a04f3d39c099cc54f7c04bf31f385d96 (patch) | |
| tree | e84af2a70d3b18a0b94c784338faf48215c9c8a8 /test/stylesheet/tc_gradient_stop.rb | |
| parent | e81036b76e734ab03fac31faafb9732f6b3b2928 (diff) | |
| download | caxlsx-350f7ae9a04f3d39c099cc54f7c04bf31f385d96.tar.gz caxlsx-350f7ae9a04f3d39c099cc54f7c04bf31f385d96.zip | |
Add RuboCop Minitest
Diffstat (limited to 'test/stylesheet/tc_gradient_stop.rb')
| -rw-r--r-- | test/stylesheet/tc_gradient_stop.rb | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/test/stylesheet/tc_gradient_stop.rb b/test/stylesheet/tc_gradient_stop.rb index a4cd4ef8..48b0d69d 100644 --- a/test/stylesheet/tc_gradient_stop.rb +++ b/test/stylesheet/tc_gradient_stop.rb @@ -8,20 +8,21 @@ class TestGradientStop < Test::Unit::TestCase def teardown; end def test_initialiation - assert_equal(@item.color.rgb, "FFFF0000") - assert_equal(@item.position, 1.0) + assert_equal("FFFF0000", @item.color.rgb) + assert_in_delta(@item.position, 1.0) end def test_position assert_raise(ArgumentError) { @item.position = -1.1 } assert_nothing_raised { @item.position = 0.0 } - assert_equal(@item.position, 0.0) + assert_in_delta(@item.position, 0.0) end def test_color assert_raise(ArgumentError) { @item.color = nil } color = Axlsx::Color.new(:rgb => "FF0000FF") @item.color = color - assert_equal(@item.color.rgb, "FF0000FF") + + assert_equal("FF0000FF", @item.color.rgb) end end |
