Skip to content

Commit

Permalink
Simplify load and require tests
Browse files Browse the repository at this point in the history
- These tests don't use autoloading so there's no need to add anything to autoload_paths
  • Loading branch information
sumbach committed Dec 3, 2011
1 parent 0531e26 commit 289ae94
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions activesupport/test/dependencies_test.rb
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 289ae94

Please sign in to comment.