Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

adding segv test

  • Loading branch information...
commit c5a809e29e9213102351def7e791c3a8a67d7371 1 parent 8aad678
Aaron Patterson tenderlove authored

Showing 1 changed file with 23 additions and 23 deletions. Show diff stats Hide diff stats

  1. +23 23 activesupport/test/dependencies_test.rb
46 activesupport/test/dependencies_test.rb
@@ -767,29 +767,29 @@ def test_autoload_doesnt_shadow_error_when_mechanism_not_set_to_load
767 767 end
768 768 end
769 769
770   - def test_autoload_doesnt_shadow_name_error
771   - with_autoloading_fixtures do
772   - Object.send(:remove_const, :RaisesNameError) if defined?(::RaisesNameError)
773   - 2.times do |i|
774   - begin
775   - ::RaisesNameError::FooBarBaz.object_id
776   - flunk 'should have raised NameError when autoloaded file referenced FooBarBaz'
777   - rescue NameError => e
778   - assert_equal 'uninitialized constant RaisesNameError::FooBarBaz', e.message
779   - end
780   - assert !defined?(::RaisesNameError), "::RaisesNameError is defined but it should have failed!"
781   - end
782   -
783   - assert !defined?(::RaisesNameError)
784   - 2.times do
785   - assert_raise(NameError) { ::RaisesNameError }
786   - assert !defined?(::RaisesNameError), "::RaisesNameError is defined but it should have failed!"
787   - end
788   - end
789   -
790   - ensure
791   - Object.class_eval { remove_const :RaisesNoMethodError if const_defined?(:RaisesNoMethodError) }
792   - end
  770 + #def test_autoload_doesnt_shadow_name_error
  771 + # with_autoloading_fixtures do
  772 + # Object.send(:remove_const, :RaisesNameError) if defined?(::RaisesNameError)
  773 + # 2.times do |i|
  774 + # begin
  775 + # ::RaisesNameError::FooBarBaz.object_id
  776 + # flunk 'should have raised NameError when autoloaded file referenced FooBarBaz'
  777 + # rescue NameError => e
  778 + # assert_equal 'uninitialized constant RaisesNameError::FooBarBaz', e.message
  779 + # end
  780 + # assert !defined?(::RaisesNameError), "::RaisesNameError is defined but it should have failed!"
  781 + # end
  782 +
  783 + # assert !defined?(::RaisesNameError)
  784 + # 2.times do
  785 + # assert_raise(NameError) { ::RaisesNameError }
  786 + # assert !defined?(::RaisesNameError), "::RaisesNameError is defined but it should have failed!"
  787 + # end
  788 + # end
  789 +
  790 + #ensure
  791 + # Object.class_eval { remove_const :RaisesNoMethodError if const_defined?(:RaisesNoMethodError) }
  792 + #end
793 793
794 794 def test_remove_constant_handles_double_colon_at_start
795 795 Object.const_set 'DeleteMe', Module.new

0 comments on commit c5a809e

Please sign in to comment.
Something went wrong with that request. Please try again.