mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-29 21:17:17 +00:00
24 lines
520 B
Ruby
24 lines
520 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(options = {}); 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
|