aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorTerence Lee <hone02@gmail.com>2013-03-15 04:07:22 -0700
committerTerence Lee <hone02@gmail.com>2013-03-15 10:05:10 -0700
commitb7d9d6e2cd5082d269dafbc0316e2107febe1451 (patch)
tree11766be91ed229cf8bd409f86f2022dd698a560d /railties/test
parentb601399b72ab56cc01368f02615af99f45d14f02 (diff)
downloadrails-b7d9d6e2cd5082d269dafbc0316e2107febe1451.tar.gz
rails-b7d9d6e2cd5082d269dafbc0316e2107febe1451.tar.bz2
rails-b7d9d6e2cd5082d269dafbc0316e2107febe1451.zip
make new rails apps log to STDOUT
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/configuration_test.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb
index 7b45623f6c..40000b0ce6 100644
--- a/railties/test/application/configuration_test.rb
+++ b/railties/test/application/configuration_test.rb
@@ -670,5 +670,26 @@ module ApplicationTests
end
end
end
+
+ test "set logger to STDOUT by default" do
+ stdout = capture(:stdout) do
+ app = build_app
+
+ controller :omg, <<-RUBY
+ class OmgController < ApplicationController
+ def index
+ Rails.logger.info "HI MOM"
+ render text: "omg"
+ end
+ end
+ RUBY
+
+ require "#{app_path}/config/environment"
+
+ get "/omg/index"
+ end
+
+ assert stdout.include?("HI MOM"), "STDOUT does not include 'HI MOM', #{stdout}"
+ end
end
end