Changeset 96

Show
Ignore:
Timestamp:
09/24/2006 14:52:55 (2 years ago)
Author:
mental
Message:
  • test/test_plain.rb: catch bug where import appears to create parent classes/modules which retain objects from the external environment; it's not immediately apparent how to address this, but I figured I should at least augment the test
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/test/test_plain.rb

    r89 r96  
    8080 
    8181  def test_current_nested 
    82     s = @s.eval "Sandbox.current" 
    83     assert_equal s, @s 
     82    s = @s.eval "Sandbox.current.object_id" 
     83    assert_equal s, @s.object_id 
    8484  end 
    8585 
     
    120120  def test_import_paths 
    121121    @s.import EmptyClass 
     122    assert_equal eval("String.object_id"), eval("EmptyClass.name.class.object_id") 
    122123    assert_equal EmptyClass.name, eval("EmptyClass.name") 
    123124    assert eval("EmptyClass.new.respond_to?(:empty_method)") 
    124125    @s.import OneNested::FirstClass 
     126    assert_equal eval("String.object_id"), eval("OneNested.name.class.object_id") 
    125127    assert_equal OneNested.name, eval("OneNested.name") 
    126128    assert_equal Module.name, eval("OneNested.class.name")