Sha256: 04dfef2ddd50d4f2e3990d60d004587f4add0ca1fc6ee0520b3f578fcc264d60

Contents?: true

Size: 245 Bytes

Versions: 2

Compression:

Stored size: 245 Bytes

Contents

module RspecStubHelpers
  def stub_with_fallback(obj, method)
    original_method = obj.method(method)
    allow(obj).to receive(method).with(anything()) { |*args| original_method.call(*args) }
    return allow(obj).to receive(method)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
git_reflow-0.8.1 spec/support/rspec_stub_helpers.rb
git_reflow-0.8.0 spec/support/rspec_stub_helpers.rb