1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Moving to logger methods to ActiveSupport Logger

This commit is contained in:
Karunakar (Ruby) 2011-12-24 00:17:21 +05:30
parent 8e49eb0fc7
commit 131c9ba9d0
4 changed files with 8 additions and 7 deletions

View file

@ -1,5 +1,5 @@
require 'abstract_unit'
require 'logger'
require 'active_support/logger'
require 'controller/fake_controllers'
class Address
@ -23,7 +23,7 @@ class AddressesTest < ActionController::TestCase
super
# enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
# a more accurate simulation of what happens in "real life".
@controller.logger = Logger.new(nil)
@controller.logger = ActiveSupport::Logger.new(nil)
@request.host = "www.nextangle.com"
end

View file

@ -1,5 +1,5 @@
require 'abstract_unit'
require 'logger'
require 'active_support/logger'
require 'pp' # require 'pp' early to prevent hidden_methods from not picking up the pretty-print methods until too late
# Provide some controller to run the tests on.
@ -142,7 +142,7 @@ class PerformActionTest < ActionController::TestCase
# enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
# a more accurate simulation of what happens in "real life".
@controller.logger = Logger.new(nil)
@controller.logger = ActiveSupport::Logger.new(nil)
@request = ActionController::TestRequest.new
@response = ActionController::TestResponse.new

View file

@ -1,5 +1,5 @@
require 'abstract_unit'
require 'logger'
require 'active_support/logger'
class CaptureController < ActionController::Base
def self.controller_name; "test"; end
@ -39,7 +39,7 @@ class CaptureTest < ActionController::TestCase
super
# enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
# a more accurate simulation of what happens in "real life".
@controller.logger = Logger.new(nil)
@controller.logger = ActiveSupport::Logger.new(nil)
@request.host = "www.nextangle.com"
end

View file

@ -1,5 +1,6 @@
require 'abstract_unit'
require 'controller/fake_models'
require 'active_support/logger'
require 'pathname'
class RenderJsonTest < ActionController::TestCase
@ -69,7 +70,7 @@ class RenderJsonTest < ActionController::TestCase
# enable a logger so that (e.g.) the benchmarking stuff runs, so we can get
# a more accurate simulation of what happens in "real life".
super
@controller.logger = Logger.new(nil)
@controller.logger = ActiveSupport::Logger.new(nil)
@request.host = "www.nextangle.com"
end