diff options
Diffstat (limited to 'spec/ruby/core/exception/exit_value_spec.rb')
| -rw-r--r-- | spec/ruby/core/exception/exit_value_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/ruby/core/exception/exit_value_spec.rb b/spec/ruby/core/exception/exit_value_spec.rb index 43de56af8b..bb6cff1831 100644 --- a/spec/ruby/core/exception/exit_value_spec.rb +++ b/spec/ruby/core/exception/exit_value_spec.rb @@ -1,5 +1,13 @@ require_relative '../../spec_helper' describe "LocalJumpError#exit_value" do - it "needs to be reviewed for spec completeness" + def get_me_a_return + Proc.new { return 42 } + end + + it "returns the value given to return" do + -> { get_me_a_return.call }.should.raise(LocalJumpError) { |e| + e.exit_value.should == 42 + } + end end |
