From 2abcdfd978fdcd491576a237e8c6be04ddaf884d Mon Sep 17 00:00:00 2001 From: Arthur Neves Date: Sat, 27 Feb 2016 13:02:02 -0500 Subject: Remove load_paths file --- actioncable/test/test_helper.rb | 3 --- actionmailer/test/abstract_unit.rb | 1 - actionpack/test/abstract_unit.rb | 2 -- actionview/test/abstract_unit.rb | 2 -- activejob/test/helper.rb | 2 -- activemodel/test/cases/helper.rb | 2 -- activerecord/examples/performance.rb | 1 - activerecord/examples/simple.rb | 1 - activerecord/test/cases/helper.rb | 2 -- activesupport/test/abstract_unit.rb | 7 ------- load_paths.rb | 3 --- railties/test/abstract_unit.rb | 2 -- railties/test/isolation/abstract_unit.rb | 10 +--------- railties/test/railties/generators_test.rb | 6 +----- tools/console | 4 +++- 15 files changed, 5 insertions(+), 43 deletions(-) delete mode 100644 load_paths.rb diff --git a/actioncable/test/test_helper.rb b/actioncable/test/test_helper.rb index 8ddbd4e764..8b157c9b46 100644 --- a/actioncable/test/test_helper.rb +++ b/actioncable/test/test_helper.rb @@ -1,9 +1,6 @@ -require File.expand_path('../../../load_paths', __FILE__) - require 'action_cable' require 'active_support/testing/autorun' - require 'puma' require 'mocha/setup' diff --git a/actionmailer/test/abstract_unit.rb b/actionmailer/test/abstract_unit.rb index 285b2cfcb5..8d740ac863 100644 --- a/actionmailer/test/abstract_unit.rb +++ b/actionmailer/test/abstract_unit.rb @@ -1,4 +1,3 @@ -require File.expand_path('../../../load_paths', __FILE__) require 'active_support/core_ext/kernel/reporting' # These are the normal settings that will be set up by Railties diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index 1ef10ff956..746685e492 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -1,5 +1,3 @@ -require File.expand_path('../../../load_paths', __FILE__) - $:.unshift(File.dirname(__FILE__) + '/lib') $:.unshift(File.dirname(__FILE__) + '/fixtures/helpers') $:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers') diff --git a/actionview/test/abstract_unit.rb b/actionview/test/abstract_unit.rb index 79173f730f..d31f7ddc6e 100644 --- a/actionview/test/abstract_unit.rb +++ b/actionview/test/abstract_unit.rb @@ -1,5 +1,3 @@ -require File.expand_path('../../../load_paths', __FILE__) - $:.unshift(File.dirname(__FILE__) + '/lib') $:.unshift(File.dirname(__FILE__) + '/fixtures/helpers') $:.unshift(File.dirname(__FILE__) + '/fixtures/alternate_helpers') diff --git a/activejob/test/helper.rb b/activejob/test/helper.rb index 7e86415f48..54b6076f09 100644 --- a/activejob/test/helper.rb +++ b/activejob/test/helper.rb @@ -1,5 +1,3 @@ -require File.expand_path('../../../load_paths', __FILE__) - require 'active_job' require 'support/job_buffer' diff --git a/activemodel/test/cases/helper.rb b/activemodel/test/cases/helper.rb index 27fdbc739c..44c26e4f10 100644 --- a/activemodel/test/cases/helper.rb +++ b/activemodel/test/cases/helper.rb @@ -1,5 +1,3 @@ -require File.expand_path('../../../../load_paths', __FILE__) - require 'active_model' require 'active_support/core_ext/string/access' diff --git a/activerecord/examples/performance.rb b/activerecord/examples/performance.rb index a5a1f284a0..c3c46c19c5 100644 --- a/activerecord/examples/performance.rb +++ b/activerecord/examples/performance.rb @@ -1,4 +1,3 @@ -require File.expand_path('../../../load_paths', __FILE__) require "active_record" require 'benchmark/ips' diff --git a/activerecord/examples/simple.rb b/activerecord/examples/simple.rb index 4ed5d80eb2..5a041e8417 100644 --- a/activerecord/examples/simple.rb +++ b/activerecord/examples/simple.rb @@ -1,4 +1,3 @@ -require File.expand_path('../../../load_paths', __FILE__) require 'active_record' class Person < ActiveRecord::Base diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index 95f8706d73..d2fdf03e9d 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -1,5 +1,3 @@ -require File.expand_path('../../../../load_paths', __FILE__) - require 'config' require 'active_support/testing/autorun' diff --git a/activesupport/test/abstract_unit.rb b/activesupport/test/abstract_unit.rb index c0e23e89f7..7f0fcd6996 100644 --- a/activesupport/test/abstract_unit.rb +++ b/activesupport/test/abstract_unit.rb @@ -1,12 +1,5 @@ ORIG_ARGV = ARGV.dup -begin - old, $VERBOSE = $VERBOSE, nil - require File.expand_path('../../../load_paths', __FILE__) -ensure - $VERBOSE = old -end - require 'active_support/core_ext/kernel/reporting' silence_warnings do diff --git a/load_paths.rb b/load_paths.rb deleted file mode 100644 index 0ad8fcfeda..0000000000 --- a/load_paths.rb +++ /dev/null @@ -1,3 +0,0 @@ -# bust gem prelude -require 'bundler' -Bundler.setup diff --git a/railties/test/abstract_unit.rb b/railties/test/abstract_unit.rb index 794d180e5d..2a5a731fe2 100644 --- a/railties/test/abstract_unit.rb +++ b/railties/test/abstract_unit.rb @@ -1,7 +1,5 @@ ENV["RAILS_ENV"] ||= "test" -require File.expand_path("../../../load_paths", __FILE__) - require 'stringio' require 'active_support/testing/autorun' require 'active_support/testing/stream' diff --git a/railties/test/isolation/abstract_unit.rb b/railties/test/isolation/abstract_unit.rb index 66a8cf54af..b993db88c1 100644 --- a/railties/test/isolation/abstract_unit.rb +++ b/railties/test/isolation/abstract_unit.rb @@ -311,10 +311,6 @@ module TestHelpers end def boot_rails - # FIXME: shush Sass warning spam, not relevant to testing Railties - Kernel.silence_warnings do - require File.expand_path('../../../../load_paths', __FILE__) - end end end end @@ -336,12 +332,8 @@ Module.new do FileUtils.rm_rf(app_template_path) FileUtils.mkdir(app_template_path) - environment = File.expand_path('../../../../load_paths', __FILE__) - require_environment = "-r #{environment}" - - `#{Gem.ruby} #{require_environment} #{RAILS_FRAMEWORK_ROOT}/railties/exe/rails new #{app_template_path} --skip-gemfile --skip-listen --no-rc` + `#{Gem.ruby} #{RAILS_FRAMEWORK_ROOT}/railties/exe/rails new #{app_template_path} --skip-gemfile --skip-listen --no-rc` File.open("#{app_template_path}/config/boot.rb", 'w') do |f| - f.puts "require '#{environment}'" f.puts "require 'rails/all'" end end unless defined?(RAILS_ISOLATED_ENGINE) diff --git a/railties/test/railties/generators_test.rb b/railties/test/railties/generators_test.rb index 5f4171d44b..b85e16c040 100644 --- a/railties/test/railties/generators_test.rb +++ b/railties/test/railties/generators_test.rb @@ -26,11 +26,7 @@ module RailtiesTests end def rails(cmd) - environment = File.expand_path('../../../../load_paths', __FILE__) - if File.exist?("#{environment}.rb") - require_environment = "-r #{environment}" - end - `#{Gem.ruby} #{require_environment} #{RAILS_FRAMEWORK_ROOT}/railties/exe/rails #{cmd}` + `#{Gem.ruby} #{RAILS_FRAMEWORK_ROOT}/railties/exe/rails #{cmd}` end def build_engine(is_mountable=false) diff --git a/tools/console b/tools/console index ea995a1a54..98a848ff6b 100755 --- a/tools/console +++ b/tools/console @@ -1,5 +1,7 @@ #!/usr/bin/env ruby -require File.expand_path('../../load_paths', __FILE__) +require 'bundler' +Bundler.setup + require 'rails/all' require 'active_support/all' require 'irb' -- cgit v1.2.3