diff options
| author | Randy Morgan <[email protected]> | 2012-03-26 18:29:35 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2012-03-26 18:29:35 +0900 |
| commit | 42f45f4138a1f71b19411fd8600f2a2bce67a46b (patch) | |
| tree | bcef93a7c400d806f1f8aa7a4ebc08d359540d67 /test/workbook/worksheet/tc_row.rb | |
| parent | d7ccb09a0aaac4564fe01a56305e68d41ee37f57 (diff) | |
| download | caxlsx-42f45f4138a1f71b19411fd8600f2a2bce67a46b.tar.gz caxlsx-42f45f4138a1f71b19411fd8600f2a2bce67a46b.zip | |
Quick and Dirty run on trying interpolated strings instead of nokogiri for sheet generation.
Diffstat (limited to 'test/workbook/worksheet/tc_row.rb')
| -rw-r--r-- | test/workbook/worksheet/tc_row.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/workbook/worksheet/tc_row.rb b/test/workbook/worksheet/tc_row.rb index cabdcde7..b77715c5 100644 --- a/test/workbook/worksheet/tc_row.rb +++ b/test/workbook/worksheet/tc_row.rb @@ -60,6 +60,18 @@ class TestRow < Test::Unit::TestCase assert_equal(0, doc.xpath(".//row[@customHeight]").size) end + def test_to_xml_string + r_s_xml = Nokogiri::XML(@row.to_xml_string) + assert_equal(r_s_xml.xpath(".//row[@r=1]").size, 1) + end + + def test_to_xml_string_with_custom_height + @row.add_cell 1 + @row.height = 20 + r_s_xml = Nokogiri::XML(@row.to_xml_string) + assert_equal(r_s_xml.xpath(".//row[@r=1][@ht=20][@customHeight=1]").size, 1) + end + def test_to_xml_with_custom_height @row.height = 20 xml = Nokogiri::XML::Builder.new |
