Sha256: 171f8df7b67e489c7c2dfe26f888263d699a4630943060905389554cdaa6751b

Contents?: true

Size: 774 Bytes

Versions: 44

Compression:

Stored size: 774 Bytes

Contents

require 'test_helper'

class TC_testVerbatimWrapper < Clean::Test::TestCase
  include TestHelper

  test_that "verbatim wrapper handles nil" do
    Given {
      @wrapper = GLI::Commands::HelpModules::VerbatimWrapper.new(any_int,any_int)
    }
    When {
      @result = @wrapper.wrap(nil)
    }
    Then {
      assert_equal '',@result
    }
  end

  test_that "verbatim wrapper doesn't touch the input" do
    Given {
      @wrapper = GLI::Commands::HelpModules::VerbatimWrapper.new(any_int,any_int)
      @input = <<EOS
      |This is|an ASCII|table|
      +-------+--------+-----+
      | foo   |  bar   | baz |
      +-------+--------+-----+
EOS
    }
    When {
      @result = @wrapper.wrap(@input)
    }
    Then {
      assert_equal @input,@result
    }
  end

end

Version data entries

44 entries across 44 versions & 2 rubygems

Version Path
gli-2.19.2 test/tc_verbatim_wrapper.rb
gli-2.19.1 test/tc_verbatim_wrapper.rb
gli-2.19.0 test/tc_verbatim_wrapper.rb
gli-2.18.2 test/tc_verbatim_wrapper.rb
gli-2.18.1 test/tc_verbatim_wrapper.rb
gli-2.18.0 test/tc_verbatim_wrapper.rb
gli-2.17.2 test/tc_verbatim_wrapper.rb
gli-2.17.1 test/tc_verbatim_wrapper.rb
gli-2.17.0 test/tc_verbatim_wrapper.rb
gli-2.16.1 test/tc_verbatim_wrapper.rb
gli-2.16.0 test/tc_verbatim_wrapper.rb
gli-2.15.0 test/tc_verbatim_wrapper.rb
gli-2.14.0 test/tc_verbatim_wrapper.rb
gli-2.13.4 test/tc_verbatim_wrapper.rb
gli-2.13.3 test/tc_verbatim_wrapper.rb
gli-2.13.2 test/tc_verbatim_wrapper.rb
gli-2.13.1 test/tc_verbatim_wrapper.rb
gli-2.13.0 test/tc_verbatim_wrapper.rb
gli-2.12.3 test/tc_verbatim_wrapper.rb
gli-2.12.2 test/tc_verbatim_wrapper.rb