Sha256: 467dd0edd6a4f829c8529970a03fbe9875390ba361ab0b340b5a226f4447b31f

Contents?: true

Size: 665 Bytes

Versions: 21

Compression:

Stored size: 665 Bytes

Contents

require File.join(File.dirname(__FILE__), "test_helper")

class ProxyTest < Test::Unit::TestCase
  
  context 'basic proxies' do
    
    setup do
      @proxy = Perennial::Proxy.new
      @proxy.__proxy_target__ = :awesome
    end    
    should 'pass through the correct class' do
      assert_equal Symbol, @proxy.class
      assert_kind_of Symbol, @proxy
    end
    
    should 'not interfere with equals' do
      assert @proxy  == :awesome
    end
    
    should 'pass through to_s' do
      assert_equal "awesome", @proxy.to_s
    end
    
    should 'let you send to an object' do
      assert_equal "awesome", @proxy.send(:to_s)
    end
    
  end
  
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
Sutto-perennial-0.2.3.2 test/proxy_test.rb
Sutto-perennial-0.2.3.3 test/proxy_test.rb
Sutto-perennial-0.2.3.4 test/proxy_test.rb
Sutto-perennial-0.2.3.5 test/proxy_test.rb
Sutto-perennial-0.2.3.6 test/proxy_test.rb
Sutto-perennial-0.2.3.7 test/proxy_test.rb
Sutto-perennial-0.2.4.0 test/proxy_test.rb
Sutto-perennial-0.2.4.1 test/proxy_test.rb
Sutto-perennial-0.2.4.5 test/proxy_test.rb
Sutto-perennial-0.2.4.6 test/proxy_test.rb
Sutto-perennial-1.0.0.0 test/proxy_test.rb
perennial-1.2.5 test/proxy_test.rb
perennial-1.2.4 test/proxy_test.rb
perennial-1.2.3 test/proxy_test.rb
perennial-1.2.2 test/proxy_test.rb
perennial-1.2.1 test/proxy_test.rb
perennial-1.2.0 test/proxy_test.rb
perennial-1.1.0 test/proxy_test.rb
perennial-1.0.2.1 test/proxy_test.rb
perennial-1.0.2 test/proxy_test.rb