summaryrefslogtreecommitdiffhomepage
path: root/test/workbook/worksheet/tc_print_options.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_print_options.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_print_options.rb')
-rw-r--r--test/workbook/worksheet/tc_print_options.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/workbook/worksheet/tc_print_options.rb b/test/workbook/worksheet/tc_print_options.rb
index 10639bcf..2d2dfaf8 100644
--- a/test/workbook/worksheet/tc_print_options.rb
+++ b/test/workbook/worksheet/tc_print_options.rb
@@ -5,7 +5,7 @@ require 'tc_helper'
class TestPrintOptions < Test::Unit::TestCase
def setup
p = Axlsx::Package.new
- ws = p.workbook.add_worksheet :name => "hmmm"
+ ws = p.workbook.add_worksheet name: "hmmm"
@po = ws.print_options
end
@@ -17,7 +17,7 @@ class TestPrintOptions < Test::Unit::TestCase
end
def test_initialize_with_options
- optioned = Axlsx::PrintOptions.new(:grid_lines => true, :headings => true, :horizontal_centered => true, :vertical_centered => true)
+ optioned = Axlsx::PrintOptions.new(grid_lines: true, headings: true, horizontal_centered: true, vertical_centered: true)
assert(optioned.grid_lines)
assert(optioned.headings)
@@ -26,7 +26,7 @@ class TestPrintOptions < Test::Unit::TestCase
end
def test_set_all_values
- @po.set(:grid_lines => true, :headings => true, :horizontal_centered => true, :vertical_centered => true)
+ @po.set(grid_lines: true, headings: true, horizontal_centered: true, vertical_centered: true)
assert(@po.grid_lines)
assert(@po.headings)
@@ -35,7 +35,7 @@ class TestPrintOptions < Test::Unit::TestCase
end
def test_set_some_values
- @po.set(:grid_lines => true, :headings => true)
+ @po.set(grid_lines: true, headings: true)
assert(@po.grid_lines)
assert(@po.headings)
@@ -44,7 +44,7 @@ class TestPrintOptions < Test::Unit::TestCase
end
def test_to_xml
- @po.set(:grid_lines => true, :headings => true, :horizontal_centered => true, :vertical_centered => true)
+ @po.set(grid_lines: true, headings: true, horizontal_centered: true, vertical_centered: true)
doc = Nokogiri::XML.parse(@po.to_xml_string)
assert_equal(1, doc.xpath(".//printOptions[@gridLines=1][@headings=1][@horizontalCentered=1][@verticalCentered=1]").size)