mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
f4a5c938d4
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@121 19e92222-5c0b-0410-8929-a290d50e31e9
27 lines
715 B
Ruby
27 lines
715 B
Ruby
require 'test/unit'
|
|
require 'mongrel/rails'
|
|
require 'mongrel/debug'
|
|
require 'fileutils'
|
|
|
|
class MongrelDbgTest < Test::Unit::TestCase
|
|
|
|
def setup
|
|
FileUtils.rm_rf "mongrel_debug"
|
|
MongrelDbg::configure
|
|
end
|
|
|
|
def test_tracing_to_log
|
|
MongrelDbg::begin_trace(:rails)
|
|
MongrelDbg::trace(:rails, "Good stuff")
|
|
MongrelDbg::end_trace(:rails)
|
|
|
|
assert File.exist?("mongrel_debug"), "Didn't make logging directory"
|
|
assert File.exist?("mongrel_debug/rails.log"), "Didn't make the rails.log file"
|
|
assert File.size("mongrel_debug/rails.log") > 0, "Didn't write anything to the log."
|
|
|
|
Class.report_object_creations
|
|
Class.reset_object_creations
|
|
Class.report_object_creations
|
|
end
|
|
|
|
end
|