Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

adding segv test

  • Loading branch information...
commit c5a809e29e9213102351def7e791c3a8a67d7371 1 parent 8aad678
@tenderlove tenderlove authored
Showing with 23 additions and 23 deletions.
  1. +23 −23 activesupport/test/dependencies_test.rb
View
46 activesupport/test/dependencies_test.rb
@@ -767,29 +767,29 @@ def test_autoload_doesnt_shadow_error_when_mechanism_not_set_to_load
end
end
- def test_autoload_doesnt_shadow_name_error
- with_autoloading_fixtures do
- Object.send(:remove_const, :RaisesNameError) if defined?(::RaisesNameError)
- 2.times do |i|
- begin
- ::RaisesNameError::FooBarBaz.object_id
- flunk 'should have raised NameError when autoloaded file referenced FooBarBaz'
- rescue NameError => e
- assert_equal 'uninitialized constant RaisesNameError::FooBarBaz', e.message
- end
- assert !defined?(::RaisesNameError), "::RaisesNameError is defined but it should have failed!"
- end
-
- assert !defined?(::RaisesNameError)
- 2.times do
- assert_raise(NameError) { ::RaisesNameError }
- assert !defined?(::RaisesNameError), "::RaisesNameError is defined but it should have failed!"
- end
- end
-
- ensure
- Object.class_eval { remove_const :RaisesNoMethodError if const_defined?(:RaisesNoMethodError) }
- end
+ #def test_autoload_doesnt_shadow_name_error
+ # with_autoloading_fixtures do
+ # Object.send(:remove_const, :RaisesNameError) if defined?(::RaisesNameError)
+ # 2.times do |i|
+ # begin
+ # ::RaisesNameError::FooBarBaz.object_id
+ # flunk 'should have raised NameError when autoloaded file referenced FooBarBaz'
+ # rescue NameError => e
+ # assert_equal 'uninitialized constant RaisesNameError::FooBarBaz', e.message
+ # end
+ # assert !defined?(::RaisesNameError), "::RaisesNameError is defined but it should have failed!"
+ # end
+
+ # assert !defined?(::RaisesNameError)
+ # 2.times do
+ # assert_raise(NameError) { ::RaisesNameError }
+ # assert !defined?(::RaisesNameError), "::RaisesNameError is defined but it should have failed!"
+ # end
+ # end
+
+ #ensure
+ # Object.class_eval { remove_const :RaisesNoMethodError if const_defined?(:RaisesNoMethodError) }
+ #end
def test_remove_constant_handles_double_colon_at_start
Object.const_set 'DeleteMe', Module.new
Please sign in to comment.
Something went wrong with that request. Please try again.