mirror of
https://github.com/github/rails.git
synced 2026-01-09 14:48:08 -05:00
Simplify load and require tests
- These tests don't use autoloading so there's no need to add anything to autoload_paths
This commit is contained in:
@@ -264,7 +264,7 @@ class DependenciesTest < Test::Unit::TestCase
|
||||
original_features = $".dup
|
||||
$:.push(path)
|
||||
|
||||
with_loading('autoloading_fixtures/load_path') do
|
||||
with_loading do
|
||||
assert_equal true, require('loaded_constant')
|
||||
end
|
||||
ensure
|
||||
@@ -279,7 +279,7 @@ class DependenciesTest < Test::Unit::TestCase
|
||||
original_features = $".dup
|
||||
$:.push(path)
|
||||
|
||||
with_loading('autoloading_fixtures/load_path') do
|
||||
with_loading do
|
||||
Object.module_eval "module LoadedConstant; end"
|
||||
assert_equal true, require('loaded_constant')
|
||||
end
|
||||
@@ -295,7 +295,7 @@ class DependenciesTest < Test::Unit::TestCase
|
||||
original_features = $".dup
|
||||
$:.push(path)
|
||||
|
||||
with_loading('autoloading_fixtures/load_path') do
|
||||
with_loading do
|
||||
require 'loaded_constant'
|
||||
assert_equal false, require('loaded_constant')
|
||||
end
|
||||
@@ -319,7 +319,7 @@ class DependenciesTest < Test::Unit::TestCase
|
||||
original_features = $".dup
|
||||
$:.push(path)
|
||||
|
||||
with_loading('autoloading_fixtures/load_path') do
|
||||
with_loading do
|
||||
assert_equal true, load('loaded_constant.rb')
|
||||
assert_equal true, load('loaded_constant.rb')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user