Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (18 sloc) 604 Bytes
module TestHelpers
module MonkeyPatches
module StripeMock
module Instance
def self.included(base)
base.alias_method :__monkey_patched__custom_subscription_params, :custom_subscription_params
base.define_method(:custom_subscription_params) do |plans, cus, options = {}|
params = __monkey_patched__custom_subscription_params(plans, cus, options)
if (status = options[:force_status_using_our_monkey_patch])
params.merge!(status: status)
end
params
end
end
end
end
end
end
You can’t perform that action at this time.