aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test
diff options
context:
space:
mode:
authorAndrew White <andyw@pixeltrix.co.uk>2012-05-31 17:18:25 +0100
committerAndrew White <andyw@pixeltrix.co.uk>2012-05-31 17:18:25 +0100
commit67b94799c27cc3214017627aede759c5c5a39189 (patch)
treee3baef5883b73940af5fc37abda32bedd0ad13e0 /activesupport/test
parent5752b313ec63cf7015f165b28aac1d7938274c13 (diff)
downloadrails-67b94799c27cc3214017627aede759c5c5a39189.tar.gz
rails-67b94799c27cc3214017627aede759c5c5a39189.tar.bz2
rails-67b94799c27cc3214017627aede759c5c5a39189.zip
Reduce warning messages when running Active Support tests
Eliminate the warnings generated by redefining methods and constants.
Diffstat (limited to 'activesupport/test')
-rw-r--r--activesupport/test/core_ext/kernel_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/test/core_ext/kernel_test.rb b/activesupport/test/core_ext/kernel_test.rb
index e90b9d454f..99e4506be7 100644
--- a/activesupport/test/core_ext/kernel_test.rb
+++ b/activesupport/test/core_ext/kernel_test.rb
@@ -96,15 +96,16 @@ class KernelDebuggerTest < ActiveSupport::TestCase
end
def test_debugger_not_available_message_to_rails_logger
+ Object.send(:remove_const, :Rails) if Object.const_defined?(:Rails)
rails = Class.new do
def self.logger
@logger ||= MockStdErr.new
end
end
- Object.const_set("Rails", rails)
+ Object.const_set(:Rails, rails)
debugger
assert_match(/Debugger requested/, rails.logger.output.first)
ensure
- Object.send(:remove_const, "Rails")
+ Object.send(:remove_const, :Rails)
end
end