public
Rubygem
Description: ObjectProxy provides a proxied interface to Ruby objects. It lets you add methods to objects that don't normally support them.
Homepage: http://6brand.com
Clone URL: git://github.com/JackDanger/object_proxy.git
object_proxy / test / test_object_proxy_safe_hash.rb
100644 10 lines (9 sloc) 0.293 kb
1
2
3
4
5
6
7
8
9
10
require 'test/unit'
require File.dirname(__FILE__) + '/../lib/object_proxy'
 
class ObjectProxySafeHashTest < Test::Unit::TestCase
  def test_object_proxy_identifies_as_target_for_hash_lookup
    object = 'a string'
    hash = {object => true}
    assert hash[ObjectProxy.new(object)]
  end
end