Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from vanderhoorn/master
Fix bug in sanitize_worksheets if 'sheets' is empty + add a test
- Loading branch information
Showing
7 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,23 @@ | |||
#!/usr/bin/env ruby | |||
# Excel::Writer::TestWorkbook -- Spreadsheet -- 20.07.2011 | |||
|
|||
$: << File.expand_path('../../../lib', File.dirname(__FILE__)) | |||
|
|||
require 'test/unit' | |||
require 'spreadsheet' | |||
|
|||
module Spreadsheet | |||
module Excel | |||
module Writer | |||
class TestWorkbook < Test::Unit::TestCase | |||
def test_sanitize_worksheets | |||
book = Spreadsheet::Excel::Workbook.new | |||
assert_instance_of Excel::Workbook, book | |||
assert_equal book.worksheets.size, 0 | |||
workbook_writer = Excel::Writer::Workbook.new book | |||
assert_nothing_raised { workbook_writer.sanitize_worksheets book.worksheets } | |||
end | |||
end | |||
end | |||
end | |||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters