summaryrefslogtreecommitdiffhomepage
path: root/test/workbook/worksheet/tc_comment.rb
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/workbook/worksheet/tc_comment.rb
parent6752225bbb8a9eec905ec02a98f1a25a309c404a (diff)
downloadcaxlsx-083c4c6d62011cd88966d608b0c6bb736f300a0c.tar.gz
caxlsx-083c4c6d62011cd88966d608b0c6bb736f300a0c.zip
Use Ruby 1.9 hash syntax (non-production code)
Diffstat (limited to 'test/workbook/worksheet/tc_comment.rb')
-rw-r--r--test/workbook/worksheet/tc_comment.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/workbook/worksheet/tc_comment.rb b/test/workbook/worksheet/tc_comment.rb
index 65b2ca1d..aa33dba4 100644
--- a/test/workbook/worksheet/tc_comment.rb
+++ b/test/workbook/worksheet/tc_comment.rb
@@ -7,8 +7,8 @@ class TestComment < Test::Unit::TestCase
p = Axlsx::Package.new
wb = p.workbook
@ws = wb.add_worksheet
- @c1 = @ws.add_comment :ref => 'A1', :text => 'text with special char <', :author => 'author with special char <', :visible => false
- @c2 = @ws.add_comment :ref => 'C3', :text => 'rust bucket', :author => 'PO'
+ @c1 = @ws.add_comment ref: 'A1', text: 'text with special char <', author: 'author with special char <', visible: false
+ @c2 = @ws.add_comment ref: 'C3', text: 'rust bucket', author: 'PO'
end
def test_initailize
@@ -63,14 +63,14 @@ class TestComment < Test::Unit::TestCase
end
def test_comment_text_contain_author_and_text
- comment = @ws.add_comment :ref => 'C4', :text => 'some text', :author => 'Bob'
+ comment = @ws.add_comment ref: 'C4', text: 'some text', author: 'Bob'
doc = Nokogiri::XML(comment.to_xml_string)
assert_equal("Bob:\nsome text", doc.xpath("//comment/text").text)
end
def test_comment_text_does_not_contain_stray_colon_if_author_blank
- comment = @ws.add_comment :ref => 'C5', :text => 'some text', :author => ''
+ comment = @ws.add_comment ref: 'C5', text: 'some text', author: ''
doc = Nokogiri::XML(comment.to_xml_string)
assert_equal("some text", doc.xpath("//comment/text").text)