aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_helper.rb
diff options
context:
space:
mode:
authorDino Maric <dino.onex@gmail.com>2017-07-27 22:15:38 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2017-07-27 15:15:38 -0500
commite64e3f14fd255d91ac0aa7a272741df08da82701 (patch)
tree1fccbf0786ae9f981eae1b8cb736856b50479c23 /test/test_helper.rb
parent293db49b7f5969d11d5599f97bd968dbe64c7f8b (diff)
downloadrails-e64e3f14fd255d91ac0aa7a272741df08da82701.tar.gz
rails-e64e3f14fd255d91ac0aa7a272741df08da82701.tar.bz2
rails-e64e3f14fd255d91ac0aa7a272741df08da82701.zip
Introduce the Dummy. (#70)
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r--test/test_helper.rb21
1 files changed, 1 insertions, 20 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 6c5d8f85ce..9922c8685c 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -1,6 +1,4 @@
-$LOAD_PATH << File.expand_path("../../app/controllers", __FILE__)
-$LOAD_PATH << File.expand_path("../../app/models", __FILE__)
-$LOAD_PATH << File.expand_path("../../app/jobs", __FILE__)
+require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
require "bundler/setup"
require "active_support"
@@ -14,7 +12,6 @@ ActiveJob::Base.logger = nil
require "active_storage"
-require "active_storage/service"
require "yaml"
SERVICE_CONFIGURATIONS = begin
YAML.load_file(File.expand_path("../service/configurations.yml", __FILE__)).deep_symbolize_keys
@@ -23,8 +20,6 @@ rescue Errno::ENOENT
{}
end
-require "active_storage/blob"
-require "active_storage/service/disk_service"
require "tmpdir"
ActiveStorage::Blob.service = ActiveStorage::Service::DiskService.new(root: Dir.mktmpdir("active_storage_tests"))
ActiveStorage::Service.logger = ActiveSupport::Logger.new(STDOUT)
@@ -54,20 +49,6 @@ class ActiveSupport::TestCase
end
end
-require "action_controller"
-require "action_controller/test_case"
-class ActionController::TestCase
- Routes = ActionDispatch::Routing::RouteSet.new.tap do |routes|
- routes.draw do
- # FIXME: Hacky way to avoid having to instantiate the real engine
- eval(File.readlines(File.expand_path("../../config/routes.rb", __FILE__)).slice(1..-2).join("\n"))
- end
- end
-end
-
-require "active_storage/attached"
-ActiveRecord::Base.send :extend, ActiveStorage::Attached::Macros
-
require "global_id"
GlobalID.app = "ActiveStorageExampleApp"
ActiveRecord::Base.send :include, GlobalID::Identification