def stub_deps(clazz, deps)
      wrap_load(clazz) do |ctx|
        dep = deps[ctx.key]
        next ctx.load unless dep
        dep.respond_to?(:is_a?) && dep.is_a?(Proc) ? dep.call(*ctx.args) : dep
      end
    end
def stub_deps(clazz, deps)
      wrap_load(clazz) do |ctx|
        dep = deps[ctx.key]
        next ctx.load unless dep
        dep.respond_to?(:is_a?) && dep.is_a?(Proc) ? dep.call(*ctx.args) : dep
      end
    end
Registers a mock dependencies for a given class.
 When a registered dependency is loaded,
 the mock is returned instead of the actual one.
 This uses {#wrap_load} internally.

 @param clazz [Class]
 @param deps [Hash]