2006-06-30 20:42:12 +00:00
|
|
|
# Copyright (c) 2005 Zed A. Shaw
|
|
|
|
# You can redistribute it and/or modify it under the same terms as Ruby.
|
|
|
|
#
|
|
|
|
# Additional work donated by contributors. See http://mongrel.rubyforge.org/attributions.html
|
|
|
|
# for more information.
|
2006-05-21 14:46:42 +00:00
|
|
|
|
2007-10-20 23:15:19 +00:00
|
|
|
require 'test/testhelp'
|
2007-10-20 23:15:48 +00:00
|
|
|
require 'mongrel/debug'
|
2006-03-25 21:15:30 +00:00
|
|
|
|
|
|
|
class MongrelDbgTest < Test::Unit::TestCase
|
|
|
|
|
2007-10-18 01:05:50 +00:00
|
|
|
def test_tracing_to_log
|
2006-03-26 20:01:50 +00:00
|
|
|
FileUtils.rm_rf "log/mongrel_debug"
|
|
|
|
|
2007-10-18 01:05:50 +00:00
|
|
|
MongrelDbg::configure
|
2006-04-01 09:09:10 +00:00
|
|
|
out = StringIO.new
|
|
|
|
|
2006-03-25 21:15:30 +00:00
|
|
|
MongrelDbg::begin_trace(:rails)
|
|
|
|
MongrelDbg::trace(:rails, "Good stuff")
|
|
|
|
MongrelDbg::end_trace(:rails)
|
|
|
|
|
2006-03-26 20:01:50 +00:00
|
|
|
assert File.exist?("log/mongrel_debug"), "Didn't make logging directory"
|
2006-03-25 21:15:30 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|