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/tc_axlsx.rb | |
| 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/tc_axlsx.rb')
| -rw-r--r-- | test/tc_axlsx.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/tc_axlsx.rb b/test/tc_axlsx.rb index f4f6a01d..66b12ff9 100644 --- a/test/tc_axlsx.rb +++ b/test/tc_axlsx.rb @@ -96,9 +96,9 @@ class TestAxlsx < Test::Unit::TestCase end def test_range_to_a - assert_equal([['A1', 'B1', 'C1']], Axlsx::range_to_a('A1:C1')) - assert_equal([['A1', 'B1', 'C1'], ['A2', 'B2', 'C2']], Axlsx::range_to_a('A1:C2')) - assert_equal([['Z5', 'AA5', 'AB5'], ['Z6', 'AA6', 'AB6']], Axlsx::range_to_a('Z5:AB6')) + assert_equal([['A1', 'B1', 'C1']], Axlsx.range_to_a('A1:C1')) + assert_equal([['A1', 'B1', 'C1'], ['A2', 'B2', 'C2']], Axlsx.range_to_a('A1:C2')) + assert_equal([['Z5', 'AA5', 'AB5'], ['Z6', 'AA6', 'AB6']], Axlsx.range_to_a('Z5:AB6')) end def test_sanitize_frozen_control_strippped @@ -165,15 +165,15 @@ class TestAxlsx < Test::Unit::TestCase def test_escape_formulas Axlsx.instance_variable_set(:@escape_formulas, nil) - refute Axlsx::escape_formulas + refute Axlsx.escape_formulas - Axlsx::escape_formulas = true + Axlsx.escape_formulas = true - assert Axlsx::escape_formulas + assert Axlsx.escape_formulas - Axlsx::escape_formulas = false + Axlsx.escape_formulas = false - refute Axlsx::escape_formulas + refute Axlsx.escape_formulas ensure Axlsx.instance_variable_set(:@escape_formulas, nil) end |
