# To make debugging spec test with stubbed :id objects in debugger possible.
#alias_method :mock_respond_to, :respond_to?
#def respond_to?(symbol, include_private = false)
# mock_respond_to(symbol, include_private) || symbol == :object_id
# the above approach would cause broken debugger loop due to error ''Exception in DebugThread loop: unexpected invocation: #<Mock:image1>.mock_respond_to(:object_id, false)''
# so we have to resort to copying codes
def respond_to?(symbol, include_private = false)
return true if symbol == :object_id
if @responder then
if @responder.method(:respond_to?).arity > 1
@everything_stubbed || @expectations.matches_method?(symbol)
Sorry it's taken so long to reply. This message somehow ended up in my spam filter.
I've added an issue  on Github for your question.