Sha256: c957a070373797e6ebcbcffc46010331d725a64c1b27ec5ad051a653a36fd6dc
Contents?: true
Size: 559 Bytes
Versions: 26
Compression:
Stored size: 559 Bytes
Contents
require 'spec_helper' describe "The while keyword" do it "returns an s(:while) with the given expr, body and true for head" do opal_parse("while 1; 2; end").should == [:while, [:lit, 1], [:lit, 2], true] end it "uses an s(:block) if body has more than one statement" do opal_parse("while 1; 2; 3; end").should == [:while, [:lit, 1], [:block, [:lit, 2], [:lit, 3]], true] end it "treats the prefix while statement just like a regular while statement" do opal_parse("1 while 2").should == [:while, [:lit, 2], [:lit, 1], true] end end
Version data entries
26 entries across 26 versions & 1 rubygems