Sha256: 1c74f69f432d3796a21388b47c017e413f16f40bf6c2ccbf55ea5dff2b54ad2e

Contents?: true

Size: 531 Bytes

Versions: 6

Compression:

Stored size: 531 Bytes

Contents

require 'support/parser_helpers'

describe "The undef keyword" do
  it "returns s(:undef) with the argument as an s(:lit)" do
    parsed("undef a").should == [:undef, [:sym, :a]]
  end

  it "appends multiple parts onto end of list" do
    parsed("undef a, b").should == [:undef, [:sym, :a], [:sym, :b]]
  end

  it "can take symbols or fitems" do
    parsed("undef :foo").should == [:undef, [:sym, :foo]]
  end
  
  it "can take multiple symbols" do
    parsed("undef :a, :b").should == [:undef, [:sym, :a], [:sym, :b]]
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
opal-0.9.4 spec/lib/parser/undef_spec.rb
opal-0.9.3 spec/lib/parser/undef_spec.rb
opal-0.9.2 spec/lib/parser/undef_spec.rb
opal-0.9.0 spec/lib/parser/undef_spec.rb
opal-0.9.0.rc1 spec/lib/parser/undef_spec.rb
opal-0.9.0.beta2 spec/lib/parser/undef_spec.rb