summaryrefslogtreecommitdiff
path: root/spec/ruby/core/exception/reason_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/exception/reason_spec.rb')
-rw-r--r--spec/ruby/core/exception/reason_spec.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/spec/ruby/core/exception/reason_spec.rb b/spec/ruby/core/exception/reason_spec.rb
index fad4d47c64..d7022768b6 100644
--- a/spec/ruby/core/exception/reason_spec.rb
+++ b/spec/ruby/core/exception/reason_spec.rb
@@ -1,5 +1,13 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "LocalJumpError#reason" do
- it "needs to be reviewed for spec completeness"
+ def get_me_a_return
+ Proc.new { return 42 }
+ end
+
+ it "returns 'return' for a return" do
+ -> { get_me_a_return.call }.should.raise(LocalJumpError) { |e|
+ e.reason.should == :return
+ }
+ end
end