Sha256: afd8762d5ccc692ed595fa042997445ca7bae7c12dbc09074d29524b59c89f60
Contents?: true
Size: 812 Bytes
Versions: 19
Compression:
Stored size: 812 Bytes
Contents
require 'spec_helper' describe "The alias keyword" do describe "with fitem" do it "should return an s(:alias) with s(:lit)" do opal_parse("alias a b").should == [:alias, [:lit, :a], [:lit, :b]] opal_parse("alias == equals").should == [:alias, [:lit, :==], [:lit, :equals]] end it "should accept symbols as names" do opal_parse("alias :foo :bar").should == [:alias, [:lit, :foo], [:lit, :bar]] end end describe "with gvar" do it "should return a s(:valias) with two gvars as arguments" do opal_parse("alias $foo $bar").should == [:valias, :$foo, :$bar] end end describe "with gvar and nth ref" do it "should return a s(:valias) with two values as arguments" do opal_parse("alias $foo $1").should == [:valias, :$foo, :"$1"] end end end
Version data entries
19 entries across 19 versions & 1 rubygems