Fakes respond as expected to respond_to?

This commit is contained in:
danielgrippi 2011-05-19 16:24:12 -07:00
parent f2259e5e25
commit b0967ad8b4

View file

@ -48,6 +48,10 @@ class PostsFake
@fakes_collection.people_hash[@model.author_id]
end
def respond_to?(*args)
super(*args) || model.respond_to?(*args)
end
def method_missing(method, *args)
@model.send(method, *args)
end