class Mocha::ObjectReceiver

def initialize(object)

def initialize(object)
  @object = object
end

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