Files
openfoodnetwork/spec/models/spree/gateway_spec.rb
2025-03-26 11:16:24 -04:00

24 lines
509 B
Ruby

# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Spree::Gateway do
let(:test_gateway) do
Class.new(Spree::Gateway) do
def provider_class
Class.new do
def initialize(*); end
def imaginary_method; end
end
end
end
end
it "passes through all arguments on a method_missing call" do
gateway = test_gateway.new
expect(gateway.provider).to receive(:imaginary_method).with('foo')
gateway.imaginary_method('foo')
end
end