Sha256: 0b3231955a78d6f74434a6f6124181877d1d3b95b7848e2c984b436be7940af0
Contents?: true
Size: 621 Bytes
Versions: 15
Compression:
Stored size: 621 Bytes
Contents
# -*- encoding: utf-8 -*- require 'test/unit' require 'helper' require 'webgen/loggable' require 'webgen/logger' require 'stringio' class TestLoggable < Test::Unit::TestCase include Test::WebsiteHelper def setup super @website.logger = Webgen::Logger.new(@io = StringIO.new, true) @obj = Object.new @obj.extend(Webgen::Loggable) end def test_log @obj.log(:error) { 'hallo' } assert_equal("ERROR -- hallo\n", @io.string) end def test_puts @obj.puts 'test' assert_equal("test\n", @io.string) @obj.puts 'test', :verbose assert_equal("test\n", @io.string) end end
Version data entries
15 entries across 15 versions & 3 rubygems