Sha256: 83ae3585b0ca1f5760f388b0d3059a943aa383dadf3e86505e789f65f907821d

Contents?: true

Size: 655 Bytes

Versions: 19

Compression:

Stored size: 655 Bytes

Contents

require File.join(File.dirname(__FILE__), 'test_helper')

describe "auto table" do
  it "converts nonarrays to arrays and renders" do
    require 'set'
    expected_table = <<-TABLE.unindent
    +-------+
    | value |
    +-------+
    | 1     |
    | 2     |
    | 3     |
    +-------+
    3 rows in set
    TABLE
    Helpers::AutoTable.render(::Set.new([1,2,3])).should == expected_table
  end

  it "renders hash" do
    expected_table = <<-TABLE.unindent
    +---+-------+
    | 0 | 1     |
    +---+-------+
    | a | 12345 |
    +---+-------+
    1 row in set
    TABLE
    Helpers::AutoTable.render({:a=>12345}).should == expected_table
  end
end

Version data entries

19 entries across 19 versions & 3 rubygems

Version Path
hsume2-hirb-0.6.3 test/auto_table_test.rb
hsume2-hirb-0.6.2 test/auto_table_test.rb
hsume2-hirb-0.6.1 test/auto_table_test.rb
hsume2-hirb-0.6.0.beta.1 test/auto_table_test.rb
hirb-0.6.0 test/auto_table_test.rb
hirb-0.5.0 test/auto_table_test.rb
hirb-0.4.5 test/auto_table_test.rb
hirb-0.4.4 test/auto_table_test.rb
hirb-0.4.3 test/auto_table_test.rb
hirb-0.4.2 test/auto_table_test.rb
hirb-0.4.1 test/auto_table_test.rb
hirb-0.4.0 test/auto_table_test.rb
hirb-0.3.6 test/auto_table_test.rb
bbcloud-0.8.1 lib/bbcloud/vendor/hirb-0.3.4/test/auto_table_test.rb
hirb-0.3.5 test/auto_table_test.rb
bbcloud-0.6.2 lib/bbcloud/vendor/hirb/test/auto_table_test.rb
hirb-0.3.4 test/auto_table_test.rb
hirb-0.3.3 test/auto_table_test.rb
hirb-0.3.2 test/auto_table_test.rb