Sha256: ec9420b042c860fcd353ba8504f68e49d9336174b152adbf4e9866cb3cbde1c4
Contents?: true
Size: 348 Bytes
Versions: 12
Compression:
Stored size: 348 Bytes
Contents
module Bogus class MultiStubber extend Takes takes :create_double def stub_all(object, methods = {}) double = create_double.call(object) methods.each do |name, result| block = result.is_a?(Proc) ? result : proc{ result } double.stubs(name, Bogus::AnyArgs, &block) end object end end end
Version data entries
12 entries across 12 versions & 1 rubygems