Skip to content

Instantly share code, notes, and snippets.

@tomtt
Created Feb 23, 2010
Embed
What would you like to do?
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