Sha256: 00d0cb73927fcf3614ed9c11b845c5e1d6ce4caad167beaaaf48451eef64e66a

Contents?: true

Size: 347 Bytes

Versions: 8

Compression:

Stored size: 347 Bytes

Contents

require "spec_helper"
require "tagen/core/exception"

describe "Exception" do
  it "works with syntax 1" do
    MyError = Class.new Exception
    MyError.exit_code = 1

    MyError.new.exit_code.should == 1
  end

  it "works with syntax 2" do
    class MyError2 < Exception; @@exit_code = 1 end
    MyError2.new.exit_code.should == 1
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
tagen-1.1.7 spec/tagen/core/exception_spec.rb
tagen-1.1.6 spec/tagen/core/exception_spec.rb
tagen-1.1.5 spec/tagen/core/exception_spec.rb
tagen-1.1.4 spec/tagen/core/exception_spec.rb
tagen-1.1.3 spec/tagen/core/exception_spec.rb
tagen-1.1.2 spec/tagen/core/exception_spec.rb
tagen-1.1.1 spec/tagen/core/exception_spec.rb
tagen-1.1.0 spec/tagen/core/exception_spec.rb