Skip to content
Permalink
Browse files
Merge pull request #3581 from rubinius/add_name_error_receiver_specs
add failing NameError#receiver spec
  • Loading branch information
tak1n committed Jan 21, 2016
2 parents 2337179 + b48d087 commit f1d36c746f6f7d9ec5c6f767dda8ca8894e00705
Showing with 11 additions and 0 deletions.
  1. +10 −0 spec/ruby/core/exception/receiver_spec.rb
  2. +1 −0 spec/tags/ruby/core/exception/receiver_tags.txt
@@ -0,0 +1,10 @@
require File.expand_path('../../../spec_helper', __FILE__)

describe "NameError#receiver" do
it "returns the receiver of the method call where the error occurred" do
receiver = 'receiver'
exception = receiver.doesnt_exist rescue $!

exception.receiver.should equal(receiver)
end
end
@@ -0,0 +1 @@
fails:NameError#receiver returns the receiver of the method call where the error occurred

0 comments on commit f1d36c7

Please sign in to comment.