Sha256: 7c96d5731ce49bcf20b8a6ae4423891fe0db363ab0cf8dbb55133b58d5b3f218

Contents?: true

Size: 781 Bytes

Versions: 36

Compression:

Stored size: 781 Bytes

Contents

require 'epitools/term'

describe Term do

  it "sizes" do
    width, height = Term.size
    width.class.should == Fixnum
    height.class.should == Fixnum
  end

  it "tables" do
    table = Term::Table[ (1..1000).to_a ]
    #p [:cols, table.num_columns]
    #p [:rows, table.num_rows]
    #puts "columns"
    #puts table.by_columns :border=>true
    #puts "rows"
    #puts table.by_rows 
    puts table.by_rows

    table.by_columns.should_not be_nil
    table.by_rows.should_not be_nil

    table.border = true
    
    table.by_columns.should_not be_nil
    table.by_rows.should_not be_nil

  end
  
  it "tables nothing" do
    table = Term::Table.new []
    lambda { table.by_rows }.should_not raise_error
    lambda { table.by_columns }.should_not raise_error
  end
  
end

Version data entries

36 entries across 36 versions & 1 rubygems

Version Path
epitools-0.5.50 spec/term_spec.rb
epitools-0.5.49 spec/term_spec.rb
epitools-0.5.47 spec/term_spec.rb
epitools-0.5.46 spec/term_spec.rb
epitools-0.5.45 spec/term_spec.rb
epitools-0.5.44 spec/term_spec.rb
epitools-0.5.43 spec/term_spec.rb
epitools-0.5.42 spec/term_spec.rb
epitools-0.5.41 spec/term_spec.rb
epitools-0.5.39 spec/term_spec.rb
epitools-0.5.38 spec/term_spec.rb
epitools-0.5.37 spec/term_spec.rb
epitools-0.5.36 spec/term_spec.rb
epitools-0.5.35 spec/term_spec.rb
epitools-0.5.34 spec/term_spec.rb
epitools-0.5.33 spec/term_spec.rb
epitools-0.5.32 spec/term_spec.rb
epitools-0.5.31 spec/term_spec.rb
epitools-0.5.30 spec/term_spec.rb
epitools-0.5.29 spec/term_spec.rb