Sha256: 46311ec6789678c9a43c35ac7f155f603fb9ad410d14ec3d39446c6beeddb05b

Contents?: true

Size: 373 Bytes

Versions: 8

Compression:

Stored size: 373 Bytes

Contents

require 'test_helper'
require 'review/logger'

class LoggerTest < Test::Unit::TestCase
  def setup
  end

  def test_logging
    old_stderr = STDERR.dup
    IO.pipe do |r, w|
      STDERR.reopen(w)
      @logger = ReVIEW::Logger.new
      @logger.warn('test')
      msg = r.readline
      STDERR.reopen(old_stderr)

      assert_equal "WARN: test\n", msg
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
review-3.2.0 test/test_logger.rb
review-3.1.0 test/test_logger.rb
review-3.0.0 test/test_logger.rb
review-3.0.0.rc1 test/test_logger.rb
review-3.0.0.preview4 test/test_logger.rb
review-3.0.0.preview3 test/test_logger.rb
review-3.0.0.preview2 test/test_logger.rb
review-3.0.0.preview1 test/test_logger.rb