summaryrefslogtreecommitdiffhomepage
path: root/test/drawing/tc_series_title.rb
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-04-13 13:13:34 +0200
committerGeremia Taglialatela <[email protected]>2023-05-03 16:05:17 +0200
commit350f7ae9a04f3d39c099cc54f7c04bf31f385d96 (patch)
treee84af2a70d3b18a0b94c784338faf48215c9c8a8 /test/drawing/tc_series_title.rb
parente81036b76e734ab03fac31faafb9732f6b3b2928 (diff)
downloadcaxlsx-350f7ae9a04f3d39c099cc54f7c04bf31f385d96.tar.gz
caxlsx-350f7ae9a04f3d39c099cc54f7c04bf31f385d96.zip
Add RuboCop Minitest
Diffstat (limited to 'test/drawing/tc_series_title.rb')
-rw-r--r--test/drawing/tc_series_title.rb16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/drawing/tc_series_title.rb b/test/drawing/tc_series_title.rb
index a304802b..260ad826 100644
--- a/test/drawing/tc_series_title.rb
+++ b/test/drawing/tc_series_title.rb
@@ -12,21 +12,23 @@ class TestSeriesTitle < Test::Unit::TestCase
def teardown; end
def test_initialization
- assert(@title.text == "")
- assert(@title.cell.nil?)
+ assert_equal("", @title.text)
+ assert_nil(@title.cell)
end
def test_text
assert_raise(ArgumentError, "text must be a string") { @title.text = 123 }
@title.cell = @row.cells.first
@title.text = "bob"
- assert(@title.cell.nil?, "setting title with text clears the cell")
+
+ assert_nil(@title.cell, "setting title with text clears the cell")
end
def test_cell
assert_raise(ArgumentError, "cell must be a Cell") { @title.cell = "123" }
@title.cell = @row.cells.first
- assert(@title.text == "one")
+
+ assert_equal("one", @title.text)
end
def test_to_xml_string_for_special_characters
@@ -36,7 +38,8 @@ class TestSeriesTitle < Test::Unit::TestCase
doc = Nokogiri::XML(@chart.to_xml_string)
errors = doc.errors
- assert(errors.empty?, "invalid xml: #{errors.map(&:to_s).join(', ')}")
+
+ assert_empty(errors, "invalid xml: #{errors.map(&:to_s).join(', ')}")
end
def test_to_xml_string_for_special_characters_in_cell
@@ -48,6 +51,7 @@ class TestSeriesTitle < Test::Unit::TestCase
doc = Nokogiri::XML(@chart.to_xml_string)
errors = doc.errors
- assert(errors.empty?, "invalid xml: #{errors.map(&:to_s).join(', ')}")
+
+ assert_empty(errors, "invalid xml: #{errors.map(&:to_s).join(', ')}")
end
end