Created
February 23, 2010 12:00
-
-
Save tomtt/312104 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
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
describe "test" do | |
it "should call the Object level method method" do | |
class TestClass | |
def foo | |
:foo | |
end | |
end | |
s = TestClass.new | |
desired_method = s.method(:foo) | |
class TestClass | |
def method | |
raise "I do not want to call this method" | |
end | |
end | |
s.method(:foo).should == desired_method | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment