diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-09-26 15:08:25 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-09-26 15:19:34 -0700 |
commit | c131211c679ce227f4ba68e1b5f3db5ae0e2bdb6 (patch) | |
tree | 47fef77899f2ac6f3d0cbf55c354f00f5b40d44f /railties/test/application/rack | |
parent | 86ebe0bd36e03b7b7531d818f65cacdb03766abe (diff) | |
download | rails-c131211c679ce227f4ba68e1b5f3db5ae0e2bdb6.tar.gz rails-c131211c679ce227f4ba68e1b5f3db5ae0e2bdb6.tar.bz2 rails-c131211c679ce227f4ba68e1b5f3db5ae0e2bdb6.zip |
Tune up Rails::Rack::Logger. Only put space between requests in development logs.
Diffstat (limited to 'railties/test/application/rack')
-rw-r--r-- | railties/test/application/rack/logger_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/railties/test/application/rack/logger_test.rb b/railties/test/application/rack/logger_test.rb index 2f5bd3a764..701843a6fd 100644 --- a/railties/test/application/rack/logger_test.rb +++ b/railties/test/application/rack/logger_test.rb @@ -23,31 +23,31 @@ module ApplicationTests end def logs - @logs ||= @logger.logged(:info) + @logs ||= @logger.logged(:info).join("\n") end test "logger logs proper HTTP GET verb and path" do get "/blah" wait - assert_match(/^Started GET "\/blah"/, logs[0]) + assert_match 'Started GET "/blah"', logs end test "logger logs proper HTTP HEAD verb and path" do head "/blah" wait - assert_match(/^Started HEAD "\/blah"/, logs[0]) + assert_match 'Started HEAD "/blah"', logs end test "logger logs HTTP verb override" do - post "/", {:_method => 'put'} + post "/", _method: 'put' wait - assert_match(/^Started PUT "\/"/, logs[0]) + assert_match 'Started PUT "/"', logs end test "logger logs HEAD requests" do - post "/", {:_method => 'head'} + post "/", _method: 'head' wait - assert_match(/^Started HEAD "\/"/, logs[0]) + assert_match 'Started HEAD "/"', logs end end end |