Sha256: c6e1c01e328afe9ee32af33d2cc59b49751c7df18abdd0c811aac31412074506

Contents?: true

Size: 1.74 KB

Versions: 20

Compression:

Stored size: 1.74 KB

Contents

# Prevent warnings from showing up during testing.
$VERBOSE=nil

# 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

20 entries across 20 versions & 1 rubygems

Version Path
disco_app-0.9.0 test/test_helper.rb
disco_app-0.9.1 test/test_helper.rb
disco_app-0.9.2 test/test_helper.rb
disco_app-0.9.3 test/test_helper.rb
disco_app-0.9.4 test/test_helper.rb
disco_app-0.9.5 test/test_helper.rb
disco_app-0.9.6 test/test_helper.rb
disco_app-0.9.7 test/test_helper.rb
disco_app-0.9.8 test/test_helper.rb
disco_app-0.9.9 test/test_helper.rb
disco_app-0.9.10 test/test_helper.rb
disco_app-0.9.11 test/test_helper.rb
disco_app-0.10.0 test/test_helper.rb
disco_app-0.10.1 test/test_helper.rb
disco_app-0.10.2 test/test_helper.rb
disco_app-0.10.3 test/test_helper.rb
disco_app-0.10.4 test/test_helper.rb
disco_app-0.10.5 test/test_helper.rb
disco_app-0.11.0 test/test_helper.rb
disco_app-0.11.1 test/test_helper.rb