Sha256: 027fbaa23a494ef26db0a9388df102242d08c822719870b9dd1ec2717855f6f1
Contents?: true
Size: 611 Bytes
Versions: 3
Compression:
Stored size: 611 Bytes
Contents
require 'spec_helper' module WLang class Scope describe ProxyScope do it 'delegates fetch to its subject' do proxy = Scope.coerce(Scope.coerce(:who => "World")) proxy.fetch(:who).should eq("World") end it 'delegates fetch to its parent when not found' do proxy = Scope.coerce(Scope.root, Scope.coerce(:who => "World")) proxy.fetch(:who).should eq("World") end it 'fetches `self` correctly' do Scope.coerce(Scope.coerce(12)).fetch(:self).should eq(12) end end # describe ProxyScope end # class Scope end # module WLang
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
wlang-2.0.1 | spec/unit/scope/test_proxy_scope.rb |
wlang-2.0.0 | spec/unit/scope/test_proxy_scope.rb |
wlang-2.0.0.beta | spec/unit/scope/test_proxy_scope.rb |