diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-13 17:16:49 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-03 16:05:38 +0200 |
| commit | 6e215fa74d047a2d281a5b1caa891579198f7313 (patch) | |
| tree | db4b7e6e6089475c01e4880744202d604e2e8902 /test/drawing | |
| parent | f2e55f053bac8bc2a97f2208237608e20eb1eeaa (diff) | |
| download | caxlsx-6e215fa74d047a2d281a5b1caa891579198f7313.tar.gz caxlsx-6e215fa74d047a2d281a5b1caa891579198f7313.zip | |
Fix non-production Style/NumericLiterals offenses
Diffstat (limited to 'test/drawing')
| -rw-r--r-- | test/drawing/tc_axis.rb | 2 | ||||
| -rw-r--r-- | test/drawing/tc_one_cell_anchor.rb | 4 | ||||
| -rw-r--r-- | test/drawing/tc_scatter_series.rb | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/test/drawing/tc_axis.rb b/test/drawing/tc_axis.rb index 198a4cf3..d62f4fbd 100644 --- a/test/drawing/tc_axis.rb +++ b/test/drawing/tc_axis.rb @@ -49,7 +49,7 @@ class TestAxis < Test::Unit::TestCase assert_raise(ArgumentError, "requires valid angle") { @axis.label_rotation = 91 } assert_raise(ArgumentError, "requires valid angle") { @axis.label_rotation = -91 } assert_nothing_raised("accepts valid angle") { @axis.label_rotation = 45 } - assert_equal(45 * 60000, @axis.label_rotation) + assert_equal(45 * 60_000, @axis.label_rotation) end def test_tick_label_position diff --git a/test/drawing/tc_one_cell_anchor.rb b/test/drawing/tc_one_cell_anchor.rb index 0f39d103..1c28ef52 100644 --- a/test/drawing/tc_one_cell_anchor.rb +++ b/test/drawing/tc_one_cell_anchor.rb @@ -45,8 +45,8 @@ class TestOneCellAnchor < Test::Unit::TestCase def test_ext ext = @anchor.send(:ext) - assert_equal(ext[:cx], (@anchor.width * 914400 / 96)) - assert_equal(ext[:cy], (@anchor.height * 914400 / 96)) + assert_equal(ext[:cx], (@anchor.width * 914_400 / 96)) + assert_equal(ext[:cy], (@anchor.height * 914_400 / 96)) end def test_options diff --git a/test/drawing/tc_scatter_series.rb b/test/drawing/tc_scatter_series.rb index cc5a4d2e..f9f5aad0 100644 --- a/test/drawing/tc_scatter_series.rb +++ b/test/drawing/tc_scatter_series.rb @@ -43,17 +43,17 @@ class TestScatterSeries < Test::Unit::TestCase def test_ln_width @chart = @ws.add_chart Axlsx::ScatterChart, :title => "ln width", :scatter_style => :line @series = @chart.add_series :xData => [1, 2, 4], :yData => [1, 3, 9], :title => "ln_width" - @series.ln_width = 12700 + @series.ln_width = 12_700 - assert_equal(12700, @series.ln_width, 'line width assigment is allowed') + assert_equal(12_700, @series.ln_width, 'line width assigment is allowed') end def test_to_xml_string @chart.scatter_style = :line - @series.ln_width = 12700 + @series.ln_width = 12_700 doc = Nokogiri::XML(@chart.to_xml_string) - assert_equal(12700, @series.ln_width) + assert_equal(12_700, @series.ln_width) assert_equal(4, doc.xpath("//a:srgbClr[@val='#{@series.color}']").size) assert_equal(1, doc.xpath("//a:ln[@w='#{@series.ln_width}']").length) end |
