aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2013-03-15 10:09:09 -0700
committerSteve Klabnik <steve@steveklabnik.com>2013-03-15 10:09:09 -0700
commit9caba4172e91b5be1cd8e056785fbbaa344135a1 (patch)
tree0f7ec02c0de32bad2b32b7b319813544a47f1634 /railties/test
parent5558bb0d65b1bd9ad6aa0bd5a074c21d651248b3 (diff)
parentb7d9d6e2cd5082d269dafbc0316e2107febe1451 (diff)
downloadrails-9caba4172e91b5be1cd8e056785fbbaa344135a1.tar.gz
rails-9caba4172e91b5be1cd8e056785fbbaa344135a1.tar.bz2
rails-9caba4172e91b5be1cd8e056785fbbaa344135a1.zip
Merge pull request #9691 from hone/stdout_logging
Rails default logging 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