diff options
Diffstat (limited to 'test/util')
| -rw-r--r-- | test/util/tc_mime_type_utils.rb | 3 | ||||
| -rw-r--r-- | test/util/tc_simple_typed_list.rb | 5 | ||||
| -rw-r--r-- | test/util/tc_validators.rb | 8 |
3 files changed, 6 insertions, 10 deletions
diff --git a/test/util/tc_mime_type_utils.rb b/test/util/tc_mime_type_utils.rb index 52c49e2e..e469f31e 100644 --- a/test/util/tc_mime_type_utils.rb +++ b/test/util/tc_mime_type_utils.rb @@ -8,8 +8,7 @@ class TestMimeTypeUtils < Test::Unit::TestCase @test_img_url = "https://example.com/sample-image.png" end - def teardown - end + def teardown; end def test_mime_type_utils assert_equal(Axlsx::MimeTypeUtils::get_mime_type(@test_img), 'image/jpeg') diff --git a/test/util/tc_simple_typed_list.rb b/test/util/tc_simple_typed_list.rb index fc1ab0a2..5624b903 100644 --- a/test/util/tc_simple_typed_list.rb +++ b/test/util/tc_simple_typed_list.rb @@ -4,8 +4,7 @@ class TestSimpleTypedList < Test::Unit::TestCase @list = Axlsx::SimpleTypedList.new Integer end - def teardown - end + def teardown; end def test_type_is_a_class_or_array_of_class assert_nothing_raised { Axlsx::SimpleTypedList.new Integer } @@ -29,7 +28,7 @@ class TestSimpleTypedList < Test::Unit::TestCase end def test_concat_should_return_index - assert(@list.size == 0) + assert(@list.empty?) assert(@list << 1 == 0) assert(@list << 2 == 1) @list.delete_at 0 diff --git a/test/util/tc_validators.rb b/test/util/tc_validators.rb index 7df2e41b..58aa6b7c 100644 --- a/test/util/tc_validators.rb +++ b/test/util/tc_validators.rb @@ -1,10 +1,8 @@ require 'tc_helper.rb' class TestValidators < Test::Unit::TestCase - def setup - end + def setup; end - def teardown - end + def teardown; end def test_validators # unsigned_int @@ -20,7 +18,7 @@ class TestValidators < Test::Unit::TestCase assert_raise(ArgumentError) { Axlsx.validate_int(Array) } # boolean (as 0 or 1, :true, :false, true, false, or "true," "false") - [0, 1, :true, :false, true, false, "true", "false"].each do |v| + [0, 1, :true, :false, true, false, "true", "false"].each do |_v| assert_nothing_raised { Axlsx.validate_boolean 0 } end assert_raise(ArgumentError) { Axlsx.validate_boolean 2 } |
