Sha256: 70a8f709578b2f1c8739d5973cef4cc1e0a8ec1c89b26e4857371df943b67e1e

Contents?: true

Size: 1.67 KB

Versions: 2

Compression:

Stored size: 1.67 KB

Contents

# Configure Rails Environment
ENV['RAILS_ENV'] = 'test'
ENV['DEFAULT_HOST'] = 'https://test.example.com'
ENV['SHOPIFY_APP_NAME'] = 'Test Application'
ENV['SHOPIFY_APP_API_KEY'] = 'f61b26d635309536c3c83c0adc3cb972'
ENV['SHOPIFY_APP_SECRET'] = 'b607d1f8b992dccb017f9315f07af9c4'
ENV['SHOPIFY_APP_REDIRECT_URI'] = 'https://test.example.com/shopify/auth/callback'
ENV['SHOPIFY_APP_SCOPE'] = 'read_products'
ENV['SHOPIFY_CHARGES_REAL'] = 'false'

require File.expand_path("../../test/dummy/config/environment.rb",  __FILE__)
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
require "rails/test_help"

# Require our additional test support helpers.
require 'support/test_file_fixtures'
require 'support/test_shopify_api'

# Require WebMock
require 'webmock/minitest'

# Filter out Minitest backtrace while allowing backtrace from other libraries
# to be shown.
Minitest.backtrace_filter = Minitest::BacktraceFilter.new

# Load support files
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }

# Load fixtures from the engine
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
  ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
  ActiveSupport::TestCase.fixtures :all
end

# Set up the base test class.
class ActiveSupport::TestCase

  # Include helper modules common to all tests.
  include DiscoApp::Test::FileFixtures

  def log_in_as(shop)
    session[:shopify] = shop.id
    session[:shopify_domain] = shop.shopify_domain
  end

  def log_out
    session[:shopify] = nil
    session[:shopify_domain] = nil
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
disco_app-0.8.8 test/test_helper.rb
disco_app-0.8.9 test/test_helper.rb