diff options
| author | Geremia Taglialatela <[email protected]> | 2023-06-10 11:48:13 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-06-10 11:48:13 +0200 |
| commit | ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8 (patch) | |
| tree | 63a893a73f1cc51003edf218fed178bb93c604d7 /test/util | |
| parent | cfb516062de3d0725b3245cc328f96d702d662d3 (diff) | |
| download | caxlsx-ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8.tar.gz caxlsx-ee14c1bf5c6aaa96867eb4b90b510f91c3a614f8.zip | |
Fix safe Style/ColonMethodCall offenses
Caxlsx is using both `.` and `::`, 220 occurrences vs 280 to invoke
methods on `Axlsx` module.
This commit standardizes the approach towards `.`, which will also allow
shorter lines.
Performance is not affected
```
Comparison:
Axlsx.validate: 8515252.3 i/s
Axlsx::validate: 8512863.7 i/s - same-ish: difference falls within error
```
Diffstat (limited to 'test/util')
| -rw-r--r-- | test/util/tc_mime_type_utils.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/util/tc_mime_type_utils.rb b/test/util/tc_mime_type_utils.rb index 16ba45cd..f990e8e2 100644 --- a/test/util/tc_mime_type_utils.rb +++ b/test/util/tc_mime_type_utils.rb @@ -14,11 +14,11 @@ class TestMimeTypeUtils < Test::Unit::TestCase def teardown; end def test_mime_type_utils - assert_equal('image/jpeg', Axlsx::MimeTypeUtils::get_mime_type(@test_img)) - assert_equal('image/png', Axlsx::MimeTypeUtils::get_mime_type_from_uri(@test_img_url)) + assert_equal('image/jpeg', Axlsx::MimeTypeUtils.get_mime_type(@test_img)) + assert_equal('image/png', Axlsx::MimeTypeUtils.get_mime_type_from_uri(@test_img_url)) end def test_escape_uri - assert_raise(URI::InvalidURIError) { Axlsx::MimeTypeUtils::get_mime_type_from_uri('| ls') } + assert_raise(URI::InvalidURIError) { Axlsx::MimeTypeUtils.get_mime_type_from_uri('| ls') } end end |
