diff options
| author | Randy Morgan <[email protected]> | 2012-10-09 21:49:08 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-10-09 21:49:08 +0900 |
| commit | f0bc5f17ddafd8172646a04bbbc0d3b958c0205f (patch) | |
| tree | fc95c9f43d917c11820e0f21950804560e52fe4b /test/workbook/tc_workbook.rb | |
| parent | 682e0c1a950b9ca9498e0f4c89402d6f3f25657c (diff) | |
| download | caxlsx-f0bc5f17ddafd8172646a04bbbc0d3b958c0205f.tar.gz caxlsx-f0bc5f17ddafd8172646a04bbbc0d3b958c0205f.zip | |
Added a helper to find and return a worksheet from the workbook by name
Diffstat (limited to 'test/workbook/tc_workbook.rb')
| -rw-r--r-- | test/workbook/tc_workbook.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/workbook/tc_workbook.rb b/test/workbook/tc_workbook.rb index 537f9074..f10ad24a 100644 --- a/test/workbook/tc_workbook.rb +++ b/test/workbook/tc_workbook.rb @@ -16,6 +16,13 @@ class TestWorkbook < Test::Unit::TestCase assert_equal(@wb.use_autowidth, false) end + + def test_sheet_by_name_retrieval + @wb.add_worksheet(:name=>'foo') + @wb.add_worksheet(:name=>'bar') + assert_equal('foo', @wb.sheet_by_name('foo').name) + + end def test_date1904 assert_equal(Axlsx::Workbook.date1904, @wb.date1904) @wb.date1904 = :false |
