2006-06-30 16:42:12 -04: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 10:46:42 -04:00
|
|
|
|
2007-10-20 19:15:19 -04:00
|
|
|
require 'test/testhelp'
|
2006-03-25 16:15:30 -05:00
|
|
|
|
|
|
|
class MongrelDbgTest < Test::Unit::TestCase
|
|
|
|
|
2007-10-17 21:05:50 -04:00
|
|
|
def test_tracing_to_log
|
2006-03-26 15:01:50 -05:00
|
|
|
FileUtils.rm_rf "log/mongrel_debug"
|
|
|
|
|
2007-10-17 21:05:50 -04:00
|
|
|
MongrelDbg::configure
|
2006-04-01 04:09:10 -05:00
|
|
|
out = StringIO.new
|
|
|
|
|
2006-03-25 16:15:30 -05:00
|
|
|
MongrelDbg::begin_trace(:rails)
|
|
|
|
MongrelDbg::trace(:rails, "Good stuff")
|
|
|
|
MongrelDbg::end_trace(:rails)
|
|
|
|
|
2006-03-26 15:01:50 -05:00
|
|
|
assert File.exist?("log/mongrel_debug"), "Didn't make logging directory"
|
2006-03-25 16:15:30 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|