Sha256: 5583540c86bf1efe492c45d86a70c0d9da1088acf8091d05145cef533a7a76c0

Contents?: true

Size: 312 Bytes

Versions: 14

Compression:

Stored size: 312 Bytes

Contents

module GitReflow
  module RSpec
    module StubHelpers

      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
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
git_reflow-0.9.9 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.9.8 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.9.7 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.9.6 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.9.5 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.9.4 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.9.3 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.9.2 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.9.1 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.9.0 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.8.6 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.8.4 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.8.3 lib/git_reflow/rspec/stub_helpers.rb
git_reflow-0.8.2 lib/git_reflow/rspec/stub_helpers.rb