diff options
| author | 2017-06-12 03:37:11 -0400 | |
|---|---|---|
| committer | 2017-06-12 03:37:11 -0400 | |
| commit | 8280a21a23d44aa90177e2bc041d0b8dc8556f4b (patch) | |
| tree | dadef7ee085c0e990a5070bd41b6a5b98c97f4fd /test/formatters/test_yaml.rb | |
Import Upstream version 2.7.1upstream/2.7.1
Diffstat (limited to 'test/formatters/test_yaml.rb')
| -rw-r--r-- | test/formatters/test_yaml.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/formatters/test_yaml.rb b/test/formatters/test_yaml.rb new file mode 100644 index 0000000..dafc03e --- /dev/null +++ b/test/formatters/test_yaml.rb @@ -0,0 +1,20 @@ +require "test_helper" + +class TestRooFormatterYAML < Minitest::Test + def test_date_time_yaml + name = "time-test" + expected = File.open(TESTDIR + "/expected_results/#{name}.yml").read + with_each_spreadsheet(name: name) do |workbook| + assert_equal expected, workbook.to_yaml + end + end + + def test_bug_to_yaml_empty_sheet + formats = [:openoffice, :excelx] + with_each_spreadsheet(name: "emptysheets", format: formats) do |workbook| + workbook.default_sheet = workbook.sheets.first + workbook.to_yaml + assert_equal "", workbook.to_yaml + end + end +end |
