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_str_val.rb | |
| parent | e81036b76e734ab03fac31faafb9732f6b3b2928 (diff) | |
| download | caxlsx-350f7ae9a04f3d39c099cc54f7c04bf31f385d96.tar.gz caxlsx-350f7ae9a04f3d39c099cc54f7c04bf31f385d96.zip | |
Add RuboCop Minitest
Diffstat (limited to 'test/drawing/tc_str_val.rb')
| -rw-r--r-- | test/drawing/tc_str_val.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/drawing/tc_str_val.rb b/test/drawing/tc_str_val.rb index 03b0b32a..e7b72197 100644 --- a/test/drawing/tc_str_val.rb +++ b/test/drawing/tc_str_val.rb @@ -7,7 +7,7 @@ class TestStrVal < Test::Unit::TestCase end def test_initialize - assert_equal(@str_val.v, "1") + assert_equal("1", @str_val.v) end def test_to_xml_string @@ -15,7 +15,8 @@ class TestStrVal < Test::Unit::TestCase str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '">' str << @str_val.to_xml_string(0) doc = Nokogiri::XML(str) - assert_equal(doc.xpath("//c:pt/c:v[text()='1']").size, 1) + + assert_equal(1, doc.xpath("//c:pt/c:v[text()='1']").size) end def test_to_xml_string_special_characters @@ -23,6 +24,7 @@ class TestStrVal < Test::Unit::TestCase str << '<c:chartSpace xmlns:c="' << Axlsx::XML_NS_C << '">' str << @str_val_with_special_characters.to_xml_string(0) doc = Nokogiri::XML(str) - assert_equal(doc.xpath("//c:pt/c:v[text()='a & b <c>']").size, 1) + + assert_equal(1, doc.xpath("//c:pt/c:v[text()='a & b <c>']").size) end end |
