Sha256: 7d93b559577e41e2ee215436c29ca3f0585923246d78264c802069b59bc9142c

Contents?: true

Size: 345 Bytes

Versions: 45

Compression:

Stored size: 345 Bytes

Contents

module CallbackHelpers
  def type=(type)
    content['type'] = type
    @stubbed_event = Stripe::Event.construct_from(content)
    Stripe::Event.stubs(:retrieve).returns(@stubbed_event)
  end

  def run_callback_with(callback)
    observer.class_eval do
      send(callback) do |evt, target|
        yield evt, target
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
stripe-rails-1.1.2 test/support/callback_helpers.rb
stripe-rails-1.1.1 test/support/callback_helpers.rb
stripe-rails-1.1.0 test/support/callback_helpers.rb
stripe-rails-1.0.2 test/support/callback_helpers.rb
stripe-rails-1.0.1 test/support/callback_helpers.rb