Sha256: feec3043419066dbcda57a2faea0633d3c28a5e2ce3bf06cddc80a60010406a4
Contents?: true
Size: 592 Bytes
Versions: 39
Compression:
Stored size: 592 Bytes
Contents
require 'support/parser_helpers' describe "op_asgn1" do it "returns s(:op_asgn1)" do parsed('self[:foo] += 1')[0].should == :op_asgn1 end it "correctly assigns the receiver" do parsed("self[:foo] += 1")[1].should == [:self] end it "returns an arglist for args inside braces" do parsed("self[:foo] += 1")[2].should == [:arglist, [:sym, :foo]] end it "only uses the operator, not with '=' appended" do parsed("self[:foo] += 1")[3].should == '+' end it "uses a simple sexp, not an arglist" do parsed("self[:foo] += 1")[4].should == [:int, 1] end end
Version data entries
39 entries across 39 versions & 3 rubygems