Sha256: 02b181142643e1302dc5ce8b1b1eeab508849977204913fb58b7e2a52f9527f6
Contents?: true
Size: 631 Bytes
Versions: 12
Compression:
Stored size: 631 Bytes
Contents
require 'helper' require 'turnip_formatter/renderer/html/data_table' require 'turnip/table' module TurnipFormatter::Renderer::Html class TestDataTable < Test::Unit::TestCase def test_render renderer = DataTable.new( table( [ ['name', 'hp'], ['slime', '10'], ['daemon', '300'] ] ) ) document = html_parse(renderer.render).at_xpath('table') assert_equal(3, document.xpath('./tr').size) assert_equal(6, document.xpath('.//td').size) end private def table(rows) Turnip::Table.new(rows) end end end
Version data entries
12 entries across 12 versions & 1 rubygems