class Mocha::ObjectReceiver

def mocks

def mocks
  object = @object
  mocks = []
  while object
    mocha = object.mocha(false)
    mocks << mocha if mocha
    object = object.is_a?(Class) ? object.superclass : nil
  end
  mocks
end