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-2.6.0 test/support/callback_helpers.rb
stripe-rails-2.5.0 test/support/callback_helpers.rb
stripe-rails-2.4.0 test/support/callback_helpers.rb
stripe-rails-2.3.5 test/support/callback_helpers.rb
stripe-rails-2.3.4 test/support/callback_helpers.rb
stripe-rails-2.3.3 test/support/callback_helpers.rb
stripe-rails-2.3.2 test/support/callback_helpers.rb
stripe-rails-2.3.1 test/support/callback_helpers.rb
stripe-rails-2.3.0 test/support/callback_helpers.rb
stripe-rails-2.2.1 test/support/callback_helpers.rb
stripe-rails-2.2.0 test/support/callback_helpers.rb
stripe-rails-2.1.0 test/support/callback_helpers.rb
stripe-rails-2.0.0 test/support/callback_helpers.rb
stripe-rails-1.10.2 test/support/callback_helpers.rb
stripe-rails-2.0.0.pre test/support/callback_helpers.rb
stripe-rails-1.10.1 test/support/callback_helpers.rb
stripe-rails-1.10.0 test/support/callback_helpers.rb
stripe-rails-1.9.1 test/support/callback_helpers.rb
stripe-rails-1.9.0 test/support/callback_helpers.rb
stripe-rails-1.8.2 test/support/callback_helpers.rb