diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-13 13:13:34 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-03 16:05:17 +0200 |
| commit | 350f7ae9a04f3d39c099cc54f7c04bf31f385d96 (patch) | |
| tree | e84af2a70d3b18a0b94c784338faf48215c9c8a8 /test/drawing/tc_line_series.rb | |
| parent | e81036b76e734ab03fac31faafb9732f6b3b2928 (diff) | |
| download | caxlsx-350f7ae9a04f3d39c099cc54f7c04bf31f385d96.tar.gz caxlsx-350f7ae9a04f3d39c099cc54f7c04bf31f385d96.zip | |
Add RuboCop Minitest
Diffstat (limited to 'test/drawing/tc_line_series.rb')
| -rw-r--r-- | test/drawing/tc_line_series.rb | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/test/drawing/tc_line_series.rb b/test/drawing/tc_line_series.rb index 80643c4e..b125337e 100644 --- a/test/drawing/tc_line_series.rb +++ b/test/drawing/tc_line_series.rb @@ -16,42 +16,48 @@ class TestLineSeries < Test::Unit::TestCase end def test_initialize - assert_equal(@series.title.text, "bob", "series title has been applied") + assert_equal("bob", @series.title.text, "series title has been applied") assert_equal(@series.labels.class, Axlsx::AxDataSource) assert_equal(@series.data.class, Axlsx::NumDataSource) end def test_show_marker - assert_equal(true, @series.show_marker) + assert(@series.show_marker) @series.show_marker = false - assert_equal(false, @series.show_marker) + + refute(@series.show_marker) end def test_smooth - assert_equal(true, @series.smooth) + assert(@series.smooth) @series.smooth = false - assert_equal(false, @series.smooth) + + refute(@series.smooth) end def test_marker_symbol assert_equal(:default, @series.marker_symbol) @series.marker_symbol = :circle + assert_equal(:circle, @series.marker_symbol) end def test_to_xml_string doc = Nokogiri::XML(wrap_with_namespaces(@series)) + assert(doc.xpath("//srgbClr[@val='#{@series.color}']")) - assert_equal(xpath_with_namespaces(doc, "//c:marker").size, 0) + assert_equal(0, xpath_with_namespaces(doc, "//c:marker").size) assert(doc.xpath("//smooth")) @series.marker_symbol = :diamond doc = Nokogiri::XML(wrap_with_namespaces(@series)) - assert_equal(xpath_with_namespaces(doc, "//c:marker/c:symbol[@val='diamond']").size, 1) + + assert_equal(1, xpath_with_namespaces(doc, "//c:marker/c:symbol[@val='diamond']").size) @series.show_marker = false doc = Nokogiri::XML(wrap_with_namespaces(@series)) - assert_equal(xpath_with_namespaces(doc, "//c:marker/c:symbol[@val='none']").size, 1) + + assert_equal(1, xpath_with_namespaces(doc, "//c:marker/c:symbol[@val='none']").size) end def wrap_with_namespaces(series) |
