Skip to content

Instantly share code, notes, and snippets.

@tomtt
Created February 23, 2010 12:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomtt/312104 to your computer and use it in GitHub Desktop.
Save tomtt/312104 to your computer and use it in GitHub Desktop.
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