diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-09-02 18:15:27 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-09-02 18:15:27 -0700 |
commit | 34bda71752bc7401c552a7a4d5b77cf7e1bfe431 (patch) | |
tree | 098637bd23ac84f95c2e9440da2be65d76ebdcb5 /test | |
parent | d60d0b4656718a63137f89baa15b6589740ad454 (diff) | |
download | clogger-34bda71752bc7401c552a7a4d5b77cf7e1bfe431.tar.gz |
Accessing "REQUEST_METHOD" in the Rack env should be doable as a CGI-ish variable. Thanks to IƱaki Baz Castillo for spotting the issue and reporting it to me.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_clogger.rb | 8 |
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 |