parent
d54de0808c
commit
52ce6ece8c
3
activesupport/test/autoloading_fixtures/throws.rb
Normal file
3
activesupport/test/autoloading_fixtures/throws.rb
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Throws = 1
|
||||||
|
|
||||||
|
throw :t
|
@ -269,6 +269,17 @@ def test_nested_class_can_access_sibling
|
|||||||
remove_constants(:ModuleFolder)
|
remove_constants(:ModuleFolder)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_throwing_removes_autoloaded_constants
|
||||||
|
with_autoloading_fixtures do
|
||||||
|
catch :t do
|
||||||
|
Throws
|
||||||
|
end
|
||||||
|
assert !Object.const_defined?(:Throws)
|
||||||
|
end
|
||||||
|
ensure
|
||||||
|
remove_constants(:Throws)
|
||||||
|
end
|
||||||
|
|
||||||
def test_doesnt_break_normal_require
|
def test_doesnt_break_normal_require
|
||||||
path = File.expand_path("../autoloading_fixtures/load_path", __FILE__)
|
path = File.expand_path("../autoloading_fixtures/load_path", __FILE__)
|
||||||
original_path = $:.dup
|
original_path = $:.dup
|
||||||
|
Loading…
Reference in New Issue
Block a user