Permalink
Browse files

Spec for checking that defined_method is private

  • Loading branch information...
kronos committed Feb 11, 2010
1 parent b1f731d commit eb47a10035a3bfadb98ac6192765cfb3e2f67c66
Showing with 4 additions and 0 deletions.
  1. +4 −0 spec/ruby/core/module/define_method_spec.rb
@@ -106,4 +106,8 @@ class DefineMethodByProcClass
o = DefineMethodByProcClass.new
o.proc_test.should be_true
end
it "is private" do
lambda { Class.new.define_method(:foo, proc {}) }.should raise_error(NoMethodError)
end
end

0 comments on commit eb47a10

Please sign in to comment.