mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
Improvements from Rails plugin template
This commit is contained in:
@@ -32,3 +32,14 @@ ActionController::TestCase.class_eval do
|
||||
key.nil? ? assigns : assigns[key]
|
||||
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
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Configure Rails Environment
|
||||
ENV['RAILS_ENV'] = 'test'
|
||||
require 'bundler/setup'
|
||||
|
||||
begin
|
||||
@@ -35,10 +37,15 @@ else
|
||||
$minitest_version = 5
|
||||
# https://github.com/seattlerb/minitest/blob/e21fdda9d/lib/minitest/autorun.rb
|
||||
# https://github.com/seattlerb/minitest/blob/e21fdda9d/lib/minitest.rb#L45-L59
|
||||
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
||||
# to be shown.
|
||||
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
||||
end
|
||||
|
||||
require 'support/rails_app'
|
||||
|
||||
# require "rails/test_help"
|
||||
|
||||
require 'support/serialization_testing'
|
||||
|
||||
require 'support/rails5_shims'
|
||||
|
||||
Reference in New Issue
Block a user