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

23 lines
699 B
Ruby
Raw Normal View History

require 'abstract_unit'
require 'active_support/deprecation'
2012-01-05 20:12:46 -05:00
class ProxyWrappersTest < ActiveSupport::TestCase
Waffles = false
NewWaffles = :hamburgers
2010-07-26 12:57:29 -04:00
def test_deprecated_object_proxy_doesnt_wrap_falsy_objects
proxy = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(nil, "message")
assert !proxy
end
2010-07-26 12:57:29 -04:00
def test_deprecated_instance_variable_proxy_doesnt_wrap_falsy_objects
proxy = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(nil, :waffles)
assert !proxy
end
2010-07-26 12:57:29 -04:00
def test_deprecated_constant_proxy_doesnt_wrap_falsy_objects
proxy = ActiveSupport::Deprecation::DeprecatedConstantProxy.new(Waffles, NewWaffles)
assert !proxy
end
2010-07-26 12:57:29 -04:00
end