diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-05 17:17:07 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-04-06 09:54:44 +0200 |
| commit | 7e90a46d43fefcf5ff7c76c14b29b6998245cfc5 (patch) | |
| tree | 0562b39547ee41e86504bf661390ce0d571ff066 /test/drawing | |
| parent | e9496a58dbf17d4b9bb615f3cb630f1e32574ece (diff) | |
| download | caxlsx-7e90a46d43fefcf5ff7c76c14b29b6998245cfc5.tar.gz caxlsx-7e90a46d43fefcf5ff7c76c14b29b6998245cfc5.zip | |
Remove Layout/TrailingWhitespace offenses
```
rubocop --only Layout/TrailingWhitespace -a
```
Diffstat (limited to 'test/drawing')
| -rw-r--r-- | test/drawing/tc_axis.rb | 6 | ||||
| -rw-r--r-- | test/drawing/tc_d_lbls.rb | 18 | ||||
| -rw-r--r-- | test/drawing/tc_num_data.rb | 6 |
3 files changed, 15 insertions, 15 deletions
diff --git a/test/drawing/tc_axis.rb b/test/drawing/tc_axis.rb index 5a9fa5a3..71e5b6b2 100644 --- a/test/drawing/tc_axis.rb +++ b/test/drawing/tc_axis.rb @@ -20,7 +20,7 @@ class TestAxis < Test::Unit::TestCase @axis.cross_axis = Axlsx::CatAxis.new str = '<?xml version="1.0" encoding="UTF-8"?>' str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '" xmlns:a="' << Axlsx::XML_NS_A << '">' - doc = Nokogiri::XML(@axis.to_xml_string(str)) + doc = Nokogiri::XML(@axis.to_xml_string(str)) assert(doc.xpath("//a:srgbClr[@val='00FF00']")) end @@ -97,12 +97,12 @@ class TestAxis < Test::Unit::TestCase assert_raise(ArgumentError, "requires valid gridlines") { @axis.gridlines = 'alice' } assert_nothing_raised("accepts valid crosses") { @axis.gridlines = false } end - + def test_to_xml_string @axis.cross_axis = Axlsx::CatAxis.new str = '<?xml version="1.0" encoding="UTF-8"?>' str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '" xmlns:a="' << Axlsx::XML_NS_A << '">' - doc = Nokogiri::XML(@axis.to_xml_string(str)) + doc = Nokogiri::XML(@axis.to_xml_string(str)) assert(doc.xpath('//a:noFill')) assert(doc.xpath("//c:crosses[@val='#{@axis.crosses.to_s}']")) assert(doc.xpath("//c:crossAx[@val='#{@axis.cross_axis.to_s}']")) diff --git a/test/drawing/tc_d_lbls.rb b/test/drawing/tc_d_lbls.rb index dddde3a1..d5474131 100644 --- a/test/drawing/tc_d_lbls.rb +++ b/test/drawing/tc_d_lbls.rb @@ -4,12 +4,12 @@ class TestDLbls < Test::Unit::TestCase def setup @d_lbls = Axlsx::DLbls.new(Axlsx::Pie3DChart) - @boolean_attributes =[:show_legend_key, - :show_val, - :show_cat_name, - :show_ser_name, - :show_percent, - :show_bubble_size, + @boolean_attributes =[:show_legend_key, + :show_val, + :show_cat_name, + :show_ser_name, + :show_percent, + :show_bubble_size, :show_leader_lines] end @@ -21,11 +21,11 @@ class TestDLbls < Test::Unit::TestCase end def test_initialization_with_optoins - + options_hash = Hash[*[@boolean_attributes.map { |name| [name, true] }] ] d_lbls = Axlsx::DLbls.new(Axlsx::Pie3DChart, options_hash.merge( { :d_lbl_pos => :t })) - + @boolean_attributes.each do |attr| assert_equal(true, d_lbls.send(attr), "boolean attributes set by options") end @@ -47,7 +47,7 @@ class TestDLbls < Test::Unit::TestCase def test_to_xml_string str = '<?xml version="1.0" encoding="UTF-8"?>' str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '" xmlns:a="' << Axlsx::XML_NS_A << '" xmlns:r="' << Axlsx::XML_NS_R << '">' - @d_lbls.to_xml_string(str) + @d_lbls.to_xml_string(str) str << '</c:chartSpace>' doc = Nokogiri::XML(str) Axlsx.instance_values_for(@d_lbls).each do |name, value| diff --git a/test/drawing/tc_num_data.rb b/test/drawing/tc_num_data.rb index 2549af4d..f2ac64b8 100644 --- a/test/drawing/tc_num_data.rb +++ b/test/drawing/tc_num_data.rb @@ -9,11 +9,11 @@ class TestNumData < Test::Unit::TestCase def test_initialize assert_equal(@num_data.format_code, "General") end - + def test_formula_based_cell - + end - + def test_format_code assert_raise(ArgumentError) {@num_data.format_code = 7} assert_nothing_raised {@num_data.format_code = 'foo_bar'} |
