mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-26 20:56:48 +00:00
24 lines
470 B
Ruby
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
|