summaryrefslogtreecommitdiff
path: root/spec/ruby/core/exception/uncaught_throw_error_spec.rb
blob: 57f391d755fca929e018be733c5a0d4876b546b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require_relative '../../spec_helper'

describe "UncaughtThrowError" do
  it "is a subclass of ArgumentError" do
    ArgumentError.should be_ancestor_of(UncaughtThrowError)
  end
end

describe "UncaughtThrowError#tag" do
  it "returns the object thrown" do
    begin
      throw :abc

    rescue UncaughtThrowError => e
      e.tag.should == :abc
    end
  end
end