Sha256: 75bca36155cdd88671681cec2ed82b89095156562c8b4dc80e357790aa6a9841
Contents?: true
Size: 594 Bytes
Versions: 12
Compression:
Stored size: 594 Bytes
Contents
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
12 entries across 12 versions & 2 rubygems