Sha256: 1e5a65c017b4e1185bb548abb626862e99dedc4bff936a5ff0775a7510251978

Contents?: true

Size: 730 Bytes

Versions: 1

Compression:

Stored size: 730 Bytes

Contents

# frozen_string_literal: true

require "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 !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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-on-quails-0.1.0 activesupport/test/deprecation/proxy_wrappers_test.rb