Sha256: 4429d1b3ae3cb71a69eaa46535cb2baab089b3d48a26f396801c18c63af8e4b6

Contents?: true

Size: 915 Bytes

Versions: 20

Compression:

Stored size: 915 Bytes

Contents

require 'committee'
require 'sinatra'
require 'stripe'
require 'test/unit'
require 'mocha/setup'
require 'stringio'
require 'shoulda/context'
require 'webmock/test_unit'

PROJECT_ROOT = File.expand_path("../../", __FILE__)

require File.expand_path('../api_fixtures', __FILE__)
require File.expand_path('../api_stub_helpers', __FILE__)
require File.expand_path('../test_data', __FILE__)

class Test::Unit::TestCase
  include APIStubHelpers
  include Stripe::TestData
  include Mocha

  # Fixtures are available in tests using something like:
  #
  #   API_FIXTURES[:charge][:id]
  #
  API_FIXTURES = APIFixtures.new

  setup do
    Stripe.api_key = "foo"

    # Stub the Stripe API with a default stub. Note that this method can be
    # called again in test bodies in order to override responses on particular
    # endpoints.
    stub_api

    stub_connect
  end

  teardown do
    Stripe.api_key = nil
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
stripe-3.0.3 test/test_helper.rb
stripe-3.0.1 test/test_helper.rb
stripe-3.0.0 test/test_helper.rb
stripe-2.12.0 test/test_helper.rb
stripe-2.11.0 test/test_helper.rb
stripe-2.10.0 test/test_helper.rb
stripe-2.9.0 test/test_helper.rb
stripe-2.8.0 test/test_helper.rb
stripe-2.7.0 test/test_helper.rb
stripe-2.6.0 test/test_helper.rb
stripe-2.5.0 test/test_helper.rb
stripe-2.4.0 test/test_helper.rb
stripe-2.3.0 test/test_helper.rb
stripe-2.2.1 test/test_helper.rb
stripe-2.2.0 test/test_helper.rb
stripe-2.1.0 test/test_helper.rb
stripe-2.0.3 test/test_helper.rb
stripe-2.0.2 test/test_helper.rb
stripe-2.0.1 test/test_helper.rb
stripe-2.0.0 test/test_helper.rb