Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplify load and require tests

- These tests don't use autoloading so there's no need to add anything to autoload_paths
  • Loading branch information...
commit a070dd123c67ee05e5bc224dacb7c43a0aca1099 1 parent 0f81554
@sumbach sumbach authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 activesupport/test/dependencies_test.rb
View
8 activesupport/test/dependencies_test.rb
@@ -265,7 +265,7 @@ def test_require_returns_true_when_file_not_yet_required
original_features = $".dup
$:.push(path)
- with_loading('autoloading_fixtures/load_path') do
+ with_loading do
assert_equal true, require('loaded_constant')
end
ensure
@@ -280,7 +280,7 @@ def test_require_returns_true_when_file_not_yet_required_even_when_no_new_consta
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
@@ -296,7 +296,7 @@ def test_require_returns_false_when_file_already_required
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
@@ -320,7 +320,7 @@ def test_load_returns_true_when_file_found
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
Please sign in to comment.
Something went wrong with that request. Please try again.