From e81036b76e734ab03fac31faafb9732f6b3b2928 Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Thu, 13 Apr 2023 13:09:14 +0200 Subject: Fix offenses to non-production code - Lint/AmbiguousBlockAssociation - Lint/AmbiguousOperatorPrecedence - Lint/EmptyBlock - Lint/RedundantSplatExpansion - Lint/RedundantStringCoercion - Lint/SymbolConversion - Lint/UnusedBlockArgument - Style/BlockDelimiters - Style/CommentAnnotation - Style/EachForSimpleLoop - Style/EmptyMethod - Style/ExpandPathArguments - Style/FileWrite - Style/GlobalStdStream (UNSAFE) - Style/HashEachMethods (UNSAFE) - Style/NestedParenthesizedCalls - Style/NilComparison - Style/NumericLiteralPrefix (manually fixed) - Style/ParallelAssignment - Style/PreferredHashMethods (UNSAFE) - Style/RedundantInterpolation (UNSAFE) - Style/RedundantParentheses (UNSAFE) - Style/RegexpLiteral - Style/RescueStandardError - Style/SpecialGlobalVars (UNSAFE) - Style/SymbolProc (UNSAFE) - Style/ZeroLengthPredicate (UNSAFE) --- test/drawing/tc_title.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'test/drawing/tc_title.rb') diff --git a/test/drawing/tc_title.rb b/test/drawing/tc_title.rb index eb549b35..f26c307e 100644 --- a/test/drawing/tc_title.rb +++ b/test/drawing/tc_title.rb @@ -11,12 +11,11 @@ class TestTitle < Test::Unit::TestCase @chart = ws.add_chart Axlsx::Bar3DChart end - def teardown - end + def teardown; end def test_initialization assert(@title.text == "") - assert(@title.cell == nil) + assert(@title.cell.nil?) end def test_initialize_title_size @@ -28,7 +27,7 @@ class TestTitle < Test::Unit::TestCase 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(@title.cell.nil?, "setting title with text clears the cell") end def test_cell -- cgit v1.2.3