Skip to content

Commit

Permalink
Remove load_paths file
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurnn committed Feb 27, 2016
1 parent 3174b5f commit 2abcdfd
Show file tree
Hide file tree
Showing 15 changed files with 5 additions and 43 deletions.
3 changes: 0 additions & 3 deletions actioncable/test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
require File.expand_path('../../../load_paths', __FILE__)

require 'action_cable'
require 'active_support/testing/autorun'


require 'puma'

require 'mocha/setup'
Expand Down
1 change: 0 additions & 1 deletion actionmailer/test/abstract_unit.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 0 additions & 2 deletions actionpack/test/abstract_unit.rb
Original file line number Diff line number Diff line change
@@ -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')
Expand Down
2 changes: 0 additions & 2 deletions actionview/test/abstract_unit.rb
Original file line number Diff line number Diff line change
@@ -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')
Expand Down
2 changes: 0 additions & 2 deletions activejob/test/helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require File.expand_path('../../../load_paths', __FILE__)

require 'active_job'
require 'support/job_buffer'

Expand Down
2 changes: 0 additions & 2 deletions activemodel/test/cases/helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require File.expand_path('../../../../load_paths', __FILE__)

require 'active_model'
require 'active_support/core_ext/string/access'

Expand Down
1 change: 0 additions & 1 deletion activerecord/examples/performance.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../load_paths', __FILE__)
require "active_record"
require 'benchmark/ips'

Expand Down
1 change: 0 additions & 1 deletion activerecord/examples/simple.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require File.expand_path('../../../load_paths', __FILE__)
require 'active_record'

class Person < ActiveRecord::Base
Expand Down
2 changes: 0 additions & 2 deletions activerecord/test/cases/helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require File.expand_path('../../../../load_paths', __FILE__)

require 'config'

require 'active_support/testing/autorun'
Expand Down
7 changes: 0 additions & 7 deletions activesupport/test/abstract_unit.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 0 additions & 3 deletions load_paths.rb

This file was deleted.

2 changes: 0 additions & 2 deletions railties/test/abstract_unit.rb
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
10 changes: 1 addition & 9 deletions railties/test/isolation/abstract_unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,6 @@ def use_frameworks(arr)
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
Expand All @@ -336,12 +332,8 @@ class ActiveSupport::TestCase
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)
6 changes: 1 addition & 5 deletions railties/test/railties/generators_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@ def bundled_rails(cmd)
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)
Expand Down
4 changes: 3 additions & 1 deletion tools/console
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 2abcdfd

Please sign in to comment.