about summary refs log tree commit homepage
path: root/test/test_clogger.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_clogger.rb')
-rw-r--r--test/test_clogger.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_clogger.rb b/test/test_clogger.rb
index 9fd6d05..5b81125 100644
--- a/test/test_clogger.rb
+++ b/test/test_clogger.rb
@@ -402,4 +402,12 @@ class TestClogger < Test::Unit::TestCase
     assert_equal "GET /hello?goodbye=true\n", str.string
   end
 
+  def test_request_method_only
+    str = StringIO.new
+    app = lambda { |env| [302, [ %w(a) ], []] }
+    cl = Clogger.new(app, :logger => str, :format => '$request_method')
+    cl.call(@req)
+    assert_equal "GET\n", str.string
+  end
+
 end