Sha256: 46d6fae30744d2506601a6d8bd58ddda665468ce1968f90845ccf4900d348d32
Contents?: true
Size: 731 Bytes
Versions: 4
Compression:
Stored size: 731 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe Terminal::Table do Row = Terminal::Table::Row it "should default alignment to the left" do row = Row.new Terminal::Table.new, ["a", "b", "c"] cell = row.cells.first cell.value.should == 'a' cell.alignment.should == :left end it "should allow overriding of alignment" do row = Row.new Terminal::Table.new, [{:value => 'a', :alignment => :center}, "b", "c"] cell = row.cells.first cell.value.should == 'a' cell.alignment.should == :center end it "should calculate height for multiline cells" do row = Row.new Terminal::Table.new, [{:value => 'a', :alignment => :center}, "b", "c\nb"] row.height.should == 2 end end
Version data entries
4 entries across 4 versions & 1 rubygems