0
@@ -673,7 +673,7 @@ class DependenciesTest < Test::Unit::TestCase
0
assert !defined?(::RaisesNoMethodError), "::RaisesNoMethodError is defined but it should have failed!"
0
Object.class_eval { remove_const :RaisesNoMethodError if const_defined?(:RaisesNoMethodError) }
0
@@ -686,11 +686,20 @@ class DependenciesTest < Test::Unit::TestCase
0
assert !defined?(::RaisesNoMethodError), "::RaisesNoMethodError is defined but it should have failed!"
0
Object.class_eval { remove_const :RaisesNoMethodError if const_defined?(:RaisesNoMethodError) }
0
+ def test_autoload_doesnt_shadow_error_when_mechanism_not_set_to_load
0
+ with_loading 'autoloading_fixtures' do
0
+ Dependencies.mechanism = :require
0
+ assert_raise(NameError) {"RaisesNameError".constantize}
0
def test_autoload_doesnt_shadow_name_error
0
with_loading 'autoloading_fixtures' do
0
assert !defined?(::RaisesNameError), "::RaisesNameError is defined but it hasn't been referenced yet!"
0
@@ -714,7 +723,7 @@ class DependenciesTest < Test::Unit::TestCase
0
Object.class_eval { remove_const :RaisesNoMethodError if const_defined?(:RaisesNoMethodError) }
0
def test_remove_constant_handles_double_colon_at_start
0
Object.const_set 'DeleteMe', Module.new
0
DeleteMe.const_set 'OrMe', Module.new
0
@@ -724,7 +733,7 @@ class DependenciesTest < Test::Unit::TestCase
0
Dependencies.remove_constant "::DeleteMe"
0
assert ! defined?(DeleteMe)
0
def test_load_once_constants_should_not_be_unloaded
0
with_loading 'autoloading_fixtures' do
0
Dependencies.load_once_paths = Dependencies.load_paths
0
@@ -737,7 +746,7 @@ class DependenciesTest < Test::Unit::TestCase
0
Dependencies.load_once_paths = []
0
Object.class_eval { remove_const :A if const_defined?(:A) }
0
def test_load_once_paths_should_behave_when_recursively_loading
0
with_loading 'dependencies', 'autoloading_fixtures' do
0
Dependencies.load_once_paths = [Dependencies.load_paths.last]
0
@@ -753,5 +762,4 @@ class DependenciesTest < Test::Unit::TestCase
0
Dependencies.load_once_paths = []