summaryrefslogtreecommitdiffhomepage
path: root/test/workbook/tc_workbook.rb
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-06-10 11:48:13 +0200
committerGeremia Taglialatela <[email protected]>2023-06-10 11:48:13 +0200
commitee14c1bf5c6aaa96867eb4b90b510f91c3a614f8 (patch)
tree63a893a73f1cc51003edf218fed178bb93c604d7 /test/workbook/tc_workbook.rb
parentcfb516062de3d0725b3245cc328f96d702d662d3 (diff)
downloadcaxlsx-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/workbook/tc_workbook.rb')
-rw-r--r--test/workbook/tc_workbook.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/workbook/tc_workbook.rb b/test/workbook/tc_workbook.rb
index 51fe3976..2422cc79 100644
--- a/test/workbook/tc_workbook.rb
+++ b/test/workbook/tc_workbook.rb
@@ -185,7 +185,7 @@ class TestWorkbook < Test::Unit::TestCase
end
def test_escape_formulas
- Axlsx::escape_formulas = false
+ Axlsx.escape_formulas = false
p = Axlsx::Package.new
@wb = p.workbook
@@ -194,7 +194,7 @@ class TestWorkbook < Test::Unit::TestCase
assert_false @wb.add_worksheet(escape_formulas: false).escape_formulas
assert @wb.add_worksheet(escape_formulas: true).escape_formulas
- Axlsx::escape_formulas = true
+ Axlsx.escape_formulas = true
p = Axlsx::Package.new
@wb = p.workbook