adds coverage for raising while autoloading
This commit is contained in:
parent
52ce6ece8c
commit
4efb3608f0
@ -0,0 +1,3 @@
|
||||
RaisesArbitraryException = 1
|
||||
|
||||
raise Exception, 'arbitray exception message'
|
@ -269,6 +269,15 @@ def test_nested_class_can_access_sibling
|
||||
remove_constants(:ModuleFolder)
|
||||
end
|
||||
|
||||
def test_raising_removes_autoloaded_constants
|
||||
with_autoloading_fixtures do
|
||||
assert_raises(Exception, 'arbitray exception message') { RaisesArbitraryException }
|
||||
assert !Object.const_defined?(:RaisesArbitraryException)
|
||||
end
|
||||
ensure
|
||||
remove_constants(:RaisesArbitraryException)
|
||||
end
|
||||
|
||||
def test_throwing_removes_autoloaded_constants
|
||||
with_autoloading_fixtures do
|
||||
catch :t do
|
||||
|
Loading…
Reference in New Issue
Block a user