Sha256: bbb90eba3ce691b1042fdf19e41fe9dfaa3c83d02276b39bf9de341669d112dc

Contents?: true

Size: 340 Bytes

Versions: 2

Compression:

Stored size: 340 Bytes

Contents

describe String do
  describe "#align" do
    
    it "should center" do
      'foo'.align(:center, 10).should == '   foo    '
    end
    
    it "should align left" do
      'foo'.align(:left, 10).should == 'foo       '
    end
  
    it "should align right" do
      'foo'.align(:right, 10).should == '       foo'
    end
    
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
visionmedia-terminal-table-1.0.1 spec/core_ext_spec.rb
visionmedia-terminal-table-1.0.4 spec/core_ext_spec.rb