diff options
author | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-03-26 20:01:50 +0000 |
---|---|---|
committer | zedshaw <zedshaw@19e92222-5c0b-0410-8929-a290d50e31e9> | 2006-03-26 20:01:50 +0000 |
commit | f2b53a3a4b1ddacac4fc18ccbe2b016194a50777 (patch) | |
tree | 10489b9db362c71558d16d85af8bcec4139c9266 /test/test_debug.rb | |
parent | f4a5c938d461d9c5dc17f521c9efaaf352b931fa (diff) | |
download | unicorn-f2b53a3a4b1ddacac4fc18ccbe2b016194a50777.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@122 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'test/test_debug.rb')
-rw-r--r-- | test/test_debug.rb | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/test_debug.rb b/test/test_debug.rb index 7d0cb45..9c01a1c 100644 --- a/test/test_debug.rb +++ b/test/test_debug.rb @@ -1,23 +1,27 @@ +require 'fileutils' +FileUtils.mkdir_p "log/mongrel_debug" + require 'test/unit' require 'mongrel/rails' require 'mongrel/debug' -require 'fileutils' + class MongrelDbgTest < Test::Unit::TestCase def setup - FileUtils.rm_rf "mongrel_debug" + FileUtils.rm_rf "log/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." + assert File.exist?("log/mongrel_debug"), "Didn't make logging directory" + assert File.exist?("log/mongrel_debug/rails.log"), "Didn't make the rails.log file" + assert File.size("log/mongrel_debug/rails.log") > 0, "Didn't write anything to the log." Class.report_object_creations Class.reset_object_creations |