Sha256: f627fccae0b7239d464109fe01fa869a1320b95b80e5fde1786cb7954b4dfdf5

Contents?: true

Size: 246 Bytes

Versions: 14

Compression:

Stored size: 246 Bytes

Contents

require 'spec_helper'

class ExceptionSubclassTest < Exception
  def custom_method
    42
  end
end

describe "Exception" do
  it "subclasses can have methods defined on them" do
    ExceptionSubclassTest.new.custom_method.should == 42
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
opal-0.8.1 spec/opal/core/exception_spec.rb
opal-0.8.1.rc1 spec/opal/core/exception_spec.rb
opal-wedge-0.9.0.dev spec/opal/core/exception_spec.rb
opal-0.8.0 spec/opal/core/exception_spec.rb
opal-0.8.0.rc3 spec/opal/core/exception_spec.rb
opal-0.8.0.rc2 spec/opal/core/exception_spec.rb
opal-0.8.0.rc1 spec/opal/core/exception_spec.rb
opal-0.8.0.beta1 spec/opal/core/exception_spec.rb
opal-0.7.2 spec/opal/core/exception_spec.rb
opal-0.7.1 spec/opal/core/exception_spec.rb
opal-0.7.0 spec/opal/core/exception_spec.rb
opal-0.7.0.rc1 spec/opal/core/exception_spec.rb
opal-0.7.0.beta3 spec/opal/core/exception_spec.rb
opal-0.7.0.beta2 spec/opal/core/exception_spec.rb