Files
openfoodnetwork/spec/models/spree/gateway_spec.rb
2020-08-07 14:03:15 +01:00

24 lines
470 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
describe Spree::Gateway do
class Provider
def initialize(options); end
def imaginary_method; end
end
class TestGateway < Spree::Gateway
def provider_class
Provider
end
end
it "passes through all arguments on a method_missing call" do
gateway = TestGateway.new
expect(gateway.provider).to receive(:imaginary_method).with('foo')
gateway.imaginary_method('foo')
end
end