Sha256: 306813b1bb11b94b88188133a3f864f9572939ef88b876b4d80ae2742ff74fac

Contents?: true

Size: 370 Bytes

Versions: 6

Compression:

Stored size: 370 Bytes

Contents

require File.expand_path('../../spec_helper', __FILE__)

describe "The true keyword" do
  it "always returns s(:true)" do
    opal_parse("true").should == [:true]
  end

  it "cannot be assigned to" do
    lambda {
      opal_parse "true = 1"
    }.should raise_error(Exception)

    lambda {
      opal_parse "true = true"
    }.should raise_error(Exception)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
opal-0.3.20 spec/grammar/true_spec.rb
opal-0.3.19 spec/grammar/true_spec.rb
opal-0.3.18 spec/grammar/true_spec.rb
opal-0.3.17 test/grammar/true_spec.rb
opal-0.3.16 spec/grammar/true_spec.rb
opal-0.3.15 spec/grammar/true_spec.rb