diff options
| author | Geremia Taglialatela <[email protected]> | 2023-05-22 20:13:13 +0200 |
|---|---|---|
| committer | Geremia Taglialatela <[email protected]> | 2023-05-22 20:13:13 +0200 |
| commit | 083c4c6d62011cd88966d608b0c6bb736f300a0c (patch) | |
| tree | b5ceb9b3a32c4130d84c3075966b4033bf32a118 /test/workbook/worksheet/tc_rich_text.rb | |
| parent | 6752225bbb8a9eec905ec02a98f1a25a309c404a (diff) | |
| download | caxlsx-083c4c6d62011cd88966d608b0c6bb736f300a0c.tar.gz caxlsx-083c4c6d62011cd88966d608b0c6bb736f300a0c.zip | |
Use Ruby 1.9 hash syntax (non-production code)
Diffstat (limited to 'test/workbook/worksheet/tc_rich_text.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_rich_text.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/workbook/worksheet/tc_rich_text.rb b/test/workbook/worksheet/tc_rich_text.rb index ed3ec9ca..e28ea0af 100644 --- a/test/workbook/worksheet/tc_rich_text.rb +++ b/test/workbook/worksheet/tc_rich_text.rb @@ -5,12 +5,12 @@ require 'tc_helper' class RichText < Test::Unit::TestCase def setup p = Axlsx::Package.new - @ws = p.workbook.add_worksheet :name => "hmmmz" - p.workbook.styles.add_style :sz => 20 + @ws = p.workbook.add_worksheet name: "hmmmz" + p.workbook.styles.add_style sz: 20 @rt = Axlsx::RichText.new b = true 27.times do |r| - @rt.add_run "run #{r}, ", :b => (b = !b), :i => !b + @rt.add_run "run #{r}, ", b: (b = !b), i: !b end @row = @ws.add_row [@rt] @c = @row.first @@ -18,9 +18,9 @@ class RichText < Test::Unit::TestCase def test_initialize assert_equal(@c.value, @rt) - rt_direct = Axlsx::RichText.new('hi', :i => true) + rt_direct = Axlsx::RichText.new('hi', i: true) rt_indirect = Axlsx::RichText.new - rt_indirect.add_run('hi', :i => true) + rt_indirect.add_run('hi', i: true) assert_equal(1, rt_direct.runs.length) assert_equal(1, rt_indirect.runs.length) @@ -40,7 +40,7 @@ class RichText < Test::Unit::TestCase end def test_implicit_richtext - rt = Axlsx::RichText.new('a', :b => true) + rt = Axlsx::RichText.new('a', b: true) row_rt = @ws.add_row [rt] row_imp = @ws.add_row ['a'] row_imp[0].b = true |
