Created
March 10, 2010 00:32
-
-
Save kronos/327331 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/spec/ruby/language/defined_spec.rb b/spec/ruby/language/defined_spec.rb | |
| index 66cfdfd..c9cdfd7 100644 | |
| --- a/spec/ruby/language/defined_spec.rb | |
| +++ b/spec/ruby/language/defined_spec.rb | |
| @@ -39,6 +39,10 @@ describe "The defined? keyword when called with a method name" do | |
| defined?(Kernel.puts).should == "method" | |
| end | |
| + it "returns nil if method is private" do | |
| + defined?(Object.print).should be_nil | |
| + end | |
| + | |
| it "returns nil if the method is not defined" do | |
| defined?(Kernel.defined_specs_undefined_method).should be_nil | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment