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_row.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_row.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_row.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/workbook/worksheet/tc_row.rb b/test/workbook/worksheet/tc_row.rb index 273487ac..52ed036c 100644 --- a/test/workbook/worksheet/tc_row.rb +++ b/test/workbook/worksheet/tc_row.rb @@ -5,7 +5,7 @@ require 'tc_helper' class TestRow < Test::Unit::TestCase def setup p = Axlsx::Package.new - @ws = p.workbook.add_worksheet :name => "hmmm" + @ws = p.workbook.add_worksheet name: "hmmm" @row = @ws.add_row end @@ -17,7 +17,7 @@ class TestRow < Test::Unit::TestCase end def test_initialize_with_fixed_height - row = @ws.add_row([1, 2, 3, 4, 5], :height => 40) + row = @ws.add_row([1, 2, 3, 4, 5], height: 40) assert_equal(40, row.height) assert(row.custom_height) @@ -55,13 +55,13 @@ class TestRow < Test::Unit::TestCase end def test_array_to_cells - r = @ws.add_row [1, 2, 3], :style => 1, :types => [:integer, :string, :float] + r = @ws.add_row [1, 2, 3], style: 1, types: [:integer, :string, :float] assert_equal(3, r.cells.size) r.cells.each do |c| assert_equal(1, c.style) end - r = @ws.add_row [1, 2, 3], :style => [1] + r = @ws.add_row [1, 2, 3], style: [1] assert_equal(1, r.cells.first.style, "only apply style to cells with at the same index of of the style array") assert_equal(0, r.cells.last.style, "only apply style to cells with at the same index of of the style array") |
