class RSpec::Mocks::NamedObjectReference

def when_loaded(&block)

def when_loaded(&block)
  yield object if object
end