Sha256: f280280947d034fce41ca73ec1c23666fbda6f4047a4e0806ae3133c37527ec4

Contents?: true

Size: 654 Bytes

Versions: 1

Compression:

Stored size: 654 Bytes

Contents

#!/usr/local/bin/ruby -w

# tc_import.rb
#
#  Created by James Edward Gray II on 2005-04-26.
#  Copyright 2005 Gray Productions. All rights reserved.
#
#  This is Free Software.  See LICENSE and COPYING for details.

require "test/unit"

require "highline/import"
require "stringio"

class TestImport < Test::Unit::TestCase
  def test_import
    assert_respond_to(self, :agree)
    assert_respond_to(self, :ask)
    assert_respond_to(self, :choose)
    assert_respond_to(self, :say)
  end
  
  def test_redirection
    $terminal = HighLine.new(nil, (output = StringIO.new))
    say("Testing...")
    assert_equal("Testing...\n", output.string)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
highline-1.0.4 test/tc_import.rb