summaryrefslogtreecommitdiffhomepage
path: root/test/doc_props
diff options
context:
space:
mode:
authorGeremia Taglialatela <[email protected]>2023-05-22 20:13:13 +0200
committerGeremia Taglialatela <[email protected]>2023-05-22 20:13:13 +0200
commit083c4c6d62011cd88966d608b0c6bb736f300a0c (patch)
treeb5ceb9b3a32c4130d84c3075966b4033bf32a118 /test/doc_props
parent6752225bbb8a9eec905ec02a98f1a25a309c404a (diff)
downloadcaxlsx-083c4c6d62011cd88966d608b0c6bb736f300a0c.tar.gz
caxlsx-083c4c6d62011cd88966d608b0c6bb736f300a0c.zip
Use Ruby 1.9 hash syntax (non-production code)
Diffstat (limited to 'test/doc_props')
-rw-r--r--test/doc_props/tc_app.rb46
-rw-r--r--test/doc_props/tc_core.rb4
2 files changed, 25 insertions, 25 deletions
diff --git a/test/doc_props/tc_app.rb b/test/doc_props/tc_app.rb
index d96723db..82e33f12 100644
--- a/test/doc_props/tc_app.rb
+++ b/test/doc_props/tc_app.rb
@@ -5,29 +5,29 @@ require 'tc_helper'
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
diff --git a/test/doc_props/tc_core.rb b/test/doc_props/tc_core.rb
index 9714a6eb..bfacab45 100644
--- a/test/doc_props/tc_core.rb
+++ b/test/doc_props/tc_core.rb
@@ -27,7 +27,7 @@ class TestCore < Test::Unit::TestCase
def test_created_as_option
time = Time.utc(2013, 1, 1, 12, 0)
- c = Axlsx::Core.new :created => time
+ 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")
@@ -38,7 +38,7 @@ class TestCore < Test::Unit::TestCase
end
def test_creator_as_option
- c = Axlsx::Core.new :creator => "some guy"
+ c = Axlsx::Core.new creator: "some guy"
doc = Nokogiri::XML(c.to_xml_string)
assert_equal("some guy", doc.xpath('//dc:creator').text)