Permalink
Browse files

method_missing is private

  • Loading branch information...
dchelimsky committed Nov 19, 2010
1 parent 91d6d83 commit b176cfb11303f1d50def28bc924664fe5c4ed19a
Showing with 5 additions and 2 deletions.
  1. +3 −0 lib/rspec/core/extensions/kernel.rb
  2. +2 −2 spec/rspec/core/kernel_extensions_spec.rb
@@ -1,4 +1,7 @@
module Kernel
+
+ private
+
def method_missing(m, *a)
if m.to_s == 'debugger'
begin
@@ -4,9 +4,9 @@
describe "#debugger" do
it "warns if ruby-debug is not installed" do
object = Object.new
- object.should_receive(:warn).with(/debugger .* ignored/)
+ object.should_receive(:warn).with(/debugger .* ignored:\n.* ruby-debug/m)
object.stub(:require) { raise LoadError }
- object.method_missing(:debugger)
+ object.__send__ :method_missing, :debugger
end
end
end

0 comments on commit b176cfb

Please sign in to comment.