aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authoreileencodes <eileencodes@gmail.com>2015-04-06 09:03:13 -0400
committereileencodes <eileencodes@gmail.com>2015-04-06 09:03:13 -0400
commit188934cdac42491dffa63619cc0f9a5b25e0181f (patch)
tree86da78e03dab666635c41bed1d82791e9a202c92 /actionpack
parent6b98fbacf7274f903c894b9c7ddab13089f9cf1d (diff)
downloadrails-188934cdac42491dffa63619cc0f9a5b25e0181f.tar.gz
rails-188934cdac42491dffa63619cc0f9a5b25e0181f.tar.bz2
rails-188934cdac42491dffa63619cc0f9a5b25e0181f.zip
Fix ActionPack tests after changes to missing template logger
After merging #19377 ActionPack tests were missing a require for `ActiveSupport::LogSubscriber::TestHelper` and change didn't take into account that logger could be nil. Added the require and only log to info if logger exists. This wasn't caught earlier because these tests only run after a merge.
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_controller/metal/implicit_render.rb2
-rw-r--r--actionpack/test/controller/mime/respond_to_test.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/implicit_render.rb b/actionpack/lib/action_controller/metal/implicit_render.rb
index 99e96a9547..1573ea7099 100644
--- a/actionpack/lib/action_controller/metal/implicit_render.rb
+++ b/actionpack/lib/action_controller/metal/implicit_render.rb
@@ -10,7 +10,7 @@ module ActionController
if template_exists?(action_name.to_s, _prefixes, variants: request.variant)
render(*args)
else
- logger.info "No template found for #{self.class.name}\##{action_name}, rendering head :no_content"
+ logger.info "No template found for #{self.class.name}\##{action_name}, rendering head :no_content" if logger
head :no_content
end
end
diff --git a/actionpack/test/controller/mime/respond_to_test.rb b/actionpack/test/controller/mime/respond_to_test.rb
index 21407f3966..7aef8a50ce 100644
--- a/actionpack/test/controller/mime/respond_to_test.rb
+++ b/actionpack/test/controller/mime/respond_to_test.rb
@@ -1,4 +1,5 @@
require 'abstract_unit'
+require "active_support/log_subscriber/test_helper"
class RespondToController < ActionController::Base
layout :set_layout