summaryrefslogtreecommitdiff
path: root/spec/FlexiTable_spec.rb
blob: 9b67ec657591ed8864eedbae0c9599dab82ce82a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env ruby -w
# encoding: UTF-8
#
# = FlexiTable_spec.rb -- PostRunner - Manage the data from your Garmin sport devices.
#
# Copyright (c) 2014 by Chris Schlaeger <cs@taskjuggler.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of version 2 of the GNU General Public License as
# published by the Free Software Foundation.
#

require 'spec_helper'
require 'postrunner/FlexiTable'

describe PostRunner::FlexiTable do

  it 'should create a simple ASCII table' do
    t = PostRunner::FlexiTable.new do
      row(%w( a bb ))
      row(%w( ccc ddddd ))
    end
    ref = <<EOT
+---+-----+
|a  |bb   |
|ccc|ddddd|
+---+-----+
EOT
    expect(t.to_s).to eq(ref)
  end

end