Sha256: d4f48af2c7c46e38dfcd3133820d91c0e5571e47a5c1844ff075c0e5e17f3dc3
Contents?: true
Size: 786 Bytes
Versions: 3
Compression:
Stored size: 786 Bytes
Contents
require File.join(File.dirname(__FILE__), 'test_helper') class Hirb::Helpers::AutoTableTest < Test::Unit::TestCase context "auto table" do test "converts nonarrays to arrays and renders" do require 'set' expected_table = <<-TABLE.unindent +-------+ | value | +-------+ | 1 | | 2 | | 3 | +-------+ 3 rows in set TABLE Hirb::Helpers::AutoTable.render(::Set.new([1,2,3])).should == expected_table end test "renders hash" do expected_table = <<-TABLE.unindent +---+-------+ | 0 | 1 | +---+-------+ | a | 12345 | +---+-------+ 1 row in set TABLE Hirb::Helpers::AutoTable.render({:a=>12345}).should == expected_table end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hirb-0.3.1 | test/auto_table_test.rb |
hirb-0.3.0 | test/auto_table_test.rb |
hirb-0.2.10 | test/auto_table_test.rb |