fixing space errors
This commit is contained in:
parent
c819c131f2
commit
32844cbc02
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue