diff options
| author | Luka Lüdicke <[email protected]> | 2020-11-26 19:12:04 +0100 |
|---|---|---|
| committer | Luka Lüdicke <[email protected]> | 2020-11-26 19:12:19 +0100 |
| commit | b2c9fbca7564d80e7e82042f8ee0c8133bdb1f1c (patch) | |
| tree | e0f3e1fb421f9e675bc52a1349dcd838be6730ca | |
| parent | e4aeec68c8b7bb699db876df375a1e98187b21ac (diff) | |
| download | caxlsx-b2c9fbca7564d80e7e82042f8ee0c8133bdb1f1c.tar.gz caxlsx-b2c9fbca7564d80e7e82042f8ee0c8133bdb1f1c.zip | |
Group worksheet name tests together
Opposes a redundant test
| -rw-r--r-- | test/workbook/worksheet/tc_worksheet.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/test/workbook/worksheet/tc_worksheet.rb b/test/workbook/worksheet/tc_worksheet.rb index 781f5250..24f5a7c7 100644 --- a/test/workbook/worksheet/tc_worksheet.rb +++ b/test/workbook/worksheet/tc_worksheet.rb @@ -29,17 +29,6 @@ class TestWorksheet < Test::Unit::TestCase assert_raises(ArgumentError) { @ws.name = 'foo?bar' } end - def test_exception_if_name_too_long - assert_nothing_raised { @ws.name = 'x' * 31 } - assert_raises(ArgumentError) { @ws.name = 'x' * 32 } - end - - def test_exception_if_name_too_long_because_of_multibyte_characters - three_byte_character = "✔" - assert_nothing_raised { @ws.name = 'x' * 28 + three_byte_character} - assert_raises(ArgumentError) { @ws.name = 'x' * 29 + three_byte_character } - end - def test_page_margins assert(@ws.page_margins.is_a? Axlsx::PageMargins) end @@ -475,6 +464,17 @@ class TestWorksheet < Test::Unit::TestCase assert_nothing_raised { @ws.name = Array.new(31, "A").join() } end + def test_exception_if_name_too_long + assert_nothing_raised { @ws.name = 'x' * 31 } + assert_raises(ArgumentError) { @ws.name = 'x' * 32 } + end + + def test_exception_if_name_too_long_because_of_multibyte_characters + three_byte_character = "✔" + assert_nothing_raised { @ws.name = 'x' * 28 + three_byte_character} + assert_raises(ArgumentError) { @ws.name = 'x' * 29 + three_byte_character } + end + def test_set_fixed_width_column @ws.add_row ["mule", "donkey", "horse"], :widths => [20, :ignore, nil] assert(@ws.column_info.size == 3, "a data item for each column") |
