fixing space errors

This commit is contained in:
Aaron Patterson 2010-07-26 09:57:29 -07:00
parent c819c131f2
commit 32844cbc02
2 changed files with 6 additions and 6 deletions

View File

@ -5,11 +5,11 @@ module ActiveSupport
class DeprecationProxy #:nodoc:
def self.new(*args, &block)
object = args.first
return object unless object
super
end
instance_methods.each { |m| undef_method m unless m =~ /^__|^object_id$/ }
# Don't give a deprecation warning on inspect since test/unit and error

View File

@ -4,19 +4,19 @@ require 'active_support/deprecation'
class ProxyWrappersTest < Test::Unit::TestCase
Waffles = false
NewWaffles = :hamburgers
def test_deprecated_object_proxy_doesnt_wrap_falsy_objects
proxy = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(nil, "message")
assert !proxy
end
def test_deprecated_instance_variable_proxy_doesnt_wrap_falsy_objects
proxy = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(nil, :waffles)
assert !proxy
end
def test_deprecated_constant_proxy_doesnt_wrap_falsy_objects
proxy = ActiveSupport::Deprecation::DeprecatedConstantProxy.new(Waffles, NewWaffles)
assert !proxy
end
end
end