Sha256: 6bded5412be3def917ff3e9e151bc854134f75d4c764724fda9a64faa5ba6f6a

Contents?: true

Size: 362 Bytes

Versions: 7

Compression:

Stored size: 362 Bytes

Contents

describe "Kernel#raise" do
  # rubyspecs test most of this, but rubyspecs won't differentiate between nil and undefined
  it "raises messages without exceptions" do
    lambda { raise Exception }.should raise_error(Exception)
    ex = nil
    begin
      raise Exception
    rescue Exception => e
      ex = e
    end
    ex.to_s.should == 'Exception'
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
opal-0.9.4 spec/opal/core/kernel/raise_spec.rb
opal-0.9.3 spec/opal/core/kernel/raise_spec.rb
opal-0.9.2 spec/opal/core/kernel/raise_spec.rb
opal-0.9.0 spec/opal/core/kernel/raise_spec.rb
opal-0.9.0.rc1 spec/opal/core/kernel/raise_spec.rb
opal-0.9.0.beta2 spec/opal/core/kernel/raise_spec.rb
opal-0.9.0.beta1 spec/opal/core/kernel/raise_spec.rb