Sha256: 4787bb87f9edb0e1f4b39260e253a531d6ca87d65a6c3a4059aebecea2461a1e
Contents?: true
Size: 576 Bytes
Versions: 27
Compression:
Stored size: 576 Bytes
Contents
require 'native' describe "Native.alias_native" do it "refers to an attribute on @native" do Class.new { include Native::Wrapper alias_native :a, :a }.new(`{ a: 2 }`).a.should == 2 end it "refers to an attribute on @native and calls it if it's a function" do Class.new { include Native::Wrapper alias_native :a, :a }.new(`{ a: function() { return 42; } }`).a.should == 42 end it "defaults old to new" do Class.new { include Native::Wrapper alias_native :a }.new(`{ a: 42 }`).a.should == 42 end end
Version data entries
27 entries across 27 versions & 1 rubygems