Permalink
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...
1 parent 2a9f063 commit cfc467f73e801717325b4addef4fa05798462d5c @sumbach sumbach committed Dec 3, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 activesupport/test/dependencies_test.rb
@@ -264,7 +264,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
@@ -279,7 +279,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
@@ -295,7 +295,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
@@ -319,7 +319,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

0 comments on commit cfc467f

Please sign in to comment.