summaryrefslogtreecommitdiff
path: root/spec/rubyspec/core/exception/uncaught_throw_error_spec.rb
blob: 3ed166af5b711e5ef0bdd63120d45f083d01f005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require File.expand_path('../../../spec_helper', __FILE__)

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