diff options
| author | Geremia Taglialatela <[email protected]> | 2023-04-13 13:09:14 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-03 16:05:17 +0200 |
| commit | e81036b76e734ab03fac31faafb9732f6b3b2928 (patch) | |
| tree | 4a5944faddeac7aa574a26955d41f4901fccc038 /test/doc_props | |
| parent | 194e852d4f61d7c1acf4cd79df86bee43d84028a (diff) | |
| download | caxlsx-e81036b76e734ab03fac31faafb9732f6b3b2928.tar.gz caxlsx-e81036b76e734ab03fac31faafb9732f6b3b2928.zip | |
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)
Diffstat (limited to 'test/doc_props')
| -rw-r--r-- | test/doc_props/tc_app.rb | 48 | ||||
| -rw-r--r-- | test/doc_props/tc_core.rb | 4 |
2 files changed, 26 insertions, 26 deletions
diff --git a/test/doc_props/tc_app.rb b/test/doc_props/tc_app.rb index a7124be1..cee3e564 100644 --- a/test/doc_props/tc_app.rb +++ b/test/doc_props/tc_app.rb @@ -3,29 +3,29 @@ require 'tc_helper.rb' class TestApp < Test::Unit::TestCase def setup options = { - :'Template' => 'Foo.xlt', - :'Manager' => 'Penny', - :'Company' => "Bob's Repair", - :'Pages' => 1, - :'Words' => 2, - :'Characters' => 7, - :'PresentationFormat' => 'any', - :'Lines' => 1, - :'Paragraphs' => 1, - :'Slides' => 4, - :'Notes' => 1, - :'TotalTime' => 2, - :'HidddenSlides' => 3, - :'MMClips' => 10, - :'ScaleCrop' => true, - :'LinksUpToDate' => true, - :'CharactersWithSpaces' => 9, - :'SharedDoc' => false, - :'HyperlinkBase' => 'foo', - :'HyperlInksChanged' => false, - :'Application' => 'axlsx', - :'AppVersion' => '1.1.5', - :'DocSecurity' => 0 + :Template => 'Foo.xlt', + :Manager => 'Penny', + :Company => "Bob's Repair", + :Pages => 1, + :Words => 2, + :Characters => 7, + :PresentationFormat => 'any', + :Lines => 1, + :Paragraphs => 1, + :Slides => 4, + :Notes => 1, + :TotalTime => 2, + :HidddenSlides => 3, + :MMClips => 10, + :ScaleCrop => true, + :LinksUpToDate => true, + :CharactersWithSpaces => 9, + :SharedDoc => false, + :HyperlinkBase => 'foo', + :HyperlInksChanged => false, + :Application => 'axlsx', + :AppVersion => '1.1.5', + :DocSecurity => 0 } @app = Axlsx::App.new options @@ -38,6 +38,6 @@ class TestApp < Test::Unit::TestCase schema.validate(doc).each do |error| errors << error end - assert_equal(errors.size, 0, "app.xml invalid" + errors.map { |e| e.message }.to_s) + assert_equal(errors.size, 0, "app.xml invalid" + errors.map(&:message).to_s) end end diff --git a/test/doc_props/tc_core.rb b/test/doc_props/tc_core.rb index b225266a..d5412a4f 100644 --- a/test/doc_props/tc_core.rb +++ b/test/doc_props/tc_core.rb @@ -15,7 +15,7 @@ class TestCore < Test::Unit::TestCase puts error.message errors << error end - assert_equal(errors.size, 0, "core.xml Invalid" + errors.map { |e| e.message }.to_s) + assert_equal(errors.size, 0, "core.xml Invalid" + errors.map(&:message).to_s) end def test_populates_created @@ -23,7 +23,7 @@ class TestCore < Test::Unit::TestCase end def test_created_as_option - time = Time.utc(2013, 1, 1, 12, 00) + time = Time.utc(2013, 1, 1, 12, 0) c = Axlsx::Core.new :created => time doc = Nokogiri::XML(c.to_xml_string) assert_equal(doc.xpath('//dcterms:created').text, time.xmlschema, "dcterms:created incorrect") |
