Sha256: dcfbcb15d71e4caea8b6604f256ba710e7e5397cbe5d5553255c86ead74418bf

Contents?: true

Size: 1.28 KB

Versions: 7

Compression:

Stored size: 1.28 KB

Contents

require 'support/isolated_unit'
module ActiveModelSerializers
  RailsApplication = TestHelpers::Generation.make_basic_app do |app|
    app.configure do
      config.secret_key_base = 'abc123'
      config.active_support.test_order = :random
      config.action_controller.perform_caching = true
      config.action_controller.cache_store = :memory_store
    end

    app.routes.default_url_options = { host: 'example.com' }
  end
end

Routes = ActionDispatch::Routing::RouteSet.new
Routes.draw do
  get ':controller(/:action(/:id))'
  get ':controller(/:action)'
end
ActionController::Base.send :include, Routes.url_helpers
ActionController::TestCase.class_eval do
  def setup
    @routes = Routes
  end
end

# ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
# ActiveRecord::Migrator.migrations_paths << File.expand_path('../../db/migrate', __FILE__)
#
# Load fixtures from the engine
# if ActiveSupport::TestCase.respond_to?(:fixture_path=)
#   ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
#   ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
#   ActiveSupport::TestCase.file_fixture_path = ActiveSupport::TestCase.fixture_path + "/files"
#   ActiveSupport::TestCase.fixtures :all
# end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
active_model_serializers-0.10.4 test/support/rails_app.rb
agi_active_model_serializers-0.10.9 test/support/rails_app.rb
agi_active_model_serializers-0.10.8 test/support/rails_app.rb
agi_active_model_serializers-0.10.7 test/support/rails_app.rb
active_model_serializers-0.10.3 test/support/rails_app.rb
active_model_serializers-0.10.2 test/support/rails_app.rb
active_model_serializers-0.10.1 test/support/rails_app.rb