mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
203998c916
also: - makes test dependencies obvious - makes tests runnable from within subfolders
24 lines
751 B
Ruby
24 lines
751 B
Ruby
# frozen_string_literal: true
|
|
|
|
require_relative "../abstract_unit"
|
|
require "active_support/deprecation"
|
|
|
|
class ProxyWrappersTest < ActiveSupport::TestCase
|
|
Waffles = false
|
|
NewWaffles = :hamburgers
|
|
|
|
def test_deprecated_object_proxy_doesnt_wrap_falsy_objects
|
|
proxy = ActiveSupport::Deprecation::DeprecatedObjectProxy.new(nil, "message")
|
|
assert_not proxy
|
|
end
|
|
|
|
def test_deprecated_instance_variable_proxy_doesnt_wrap_falsy_objects
|
|
proxy = ActiveSupport::Deprecation::DeprecatedInstanceVariableProxy.new(nil, :waffles)
|
|
assert_not proxy
|
|
end
|
|
|
|
def test_deprecated_constant_proxy_doesnt_wrap_falsy_objects
|
|
proxy = ActiveSupport::Deprecation::DeprecatedConstantProxy.new(Waffles, NewWaffles)
|
|
assert_not proxy
|
|
end
|
|
end
|