Skip to content

Instantly share code, notes, and snippets.

@JonRowe
Created March 6, 2013 00:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save JonRowe/5095746 to your computer and use it in GitHub Desktop.
#interestingly... this line fixes the issue...
include RSpec::Matchers
describe do
specify do
obj1 = Object.new
def obj1.blah?; true; end
obj1.should be_blah
obj2 = Object.new
expect {
obj2.method(:method_missing).call(:not_a_method)
}.to raise_error(NoMethodError)
expect {
obj2.not_a_method
}.to raise_error(NoMethodError)
expect {
obj2.__send__(:method_missing, :not_a_method)
}.to raise_error(NoMethodError)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment