stripe-ruby-mock / stripe-ruby-mock

A mocking library for testing stripe ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contributing: Specs fail due undefined method `deep_merge' for

dduqueti opened this issue · comments

Specs have 84 failures due to undefined method deep_merge. This change was introduced here: cfe51c6

Not sure about how to fix it so created an issue. I'm expecting to contribute from a fork I have created after I can sort this out. Any support is welcomed.

Summary of output:

  84) StripeMock Server behaves like Completing Checkout Sessions can complete subscription checkout sessions
      Failure/Error:
        id: payment_method_id,
        object: 'payment_method',
        type: params[:type],
        billing_details: {
          address: {
            city: 'New Orleans',
            country: 'US',
            line1: 'Bourbon Street 23',
            line2: nil,
            postal_code: '10000',

      NoMethodError:
        undefined method `deep_merge' for #<Hash:0x00007fb0c1107f38>
      Shared Example Group: "Completing Checkout Sessions" called from ./spec/support/stripe_examples.rb:48
      # ./lib/stripe_mock/data.rb:1293:in `mock_payment_method'
      # ./lib/stripe_mock/request_handlers/payment_methods.rb:21:in `new_payment_method'
      # ./lib/stripe_mock/instance.rb:130:in `mock_request'
      # ./lib/stripe_mock/api/instance.rb:10:in `block in start'
      # /Users/dduqueti/.rvm/gems/ruby-2.6.5/gems/stripe-5.39.0/lib/stripe/api_operations/request.rb:47:in `execute_resource_request_internal'
      # /Users/dduqueti/.rvm/gems/ruby-2.6.5/gems/stripe-5.39.0/lib/stripe/api_operations/request.rb:9:in `execute_resource_request'
      # /Users/dduqueti/.rvm/gems/ruby-2.6.5/gems/stripe-5.39.0/lib/stripe/api_operations/create.rb:7:in `create'
      # ./spec/integration_examples/completing_checkout_sessions_example.rb:31:in `block (2 levels) in <top (required)>'

Finished in 15.04 seconds (files took 0.37384 seconds to load)
1153 examples, 84 failures, 39 pending

That was my bad, I didn't realise deep_merge was Rails. I've fixed it now and made minor improvements to the PaymentMethod code.

@TastyPi ❤️ 👍