Fakes respond as expected to respond_to?
This commit is contained in:
parent
f2259e5e25
commit
b0967ad8b4
1 changed files with 4 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue