diff options
Diffstat (limited to 'spec/ruby/core/exception/reason_spec.rb')
-rw-r--r-- | spec/ruby/core/exception/reason_spec.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/spec/ruby/core/exception/reason_spec.rb b/spec/ruby/core/exception/reason_spec.rb index b28cbde8d9..210bbc9725 100644 --- a/spec/ruby/core/exception/reason_spec.rb +++ b/spec/ruby/core/exception/reason_spec.rb @@ -4,7 +4,10 @@ describe "LocalJumpError#reason" do def get_me_a_return Proc.new { return 42 } end - -> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e| - e.reason.should == :return - } + + it "returns 'return' for a return" do + -> { get_me_a_return.call }.should raise_error(LocalJumpError) { |e| + e.reason.should == :return + } + end end |