diff options
-rw-r--r-- | test/ruby/test_autoload.rb | 18 |
1 files changed, 16 insertions, 2 deletions
@@ -224,11 +224,18 @@ p Foo::Bar Kernel.module_eval do alias old_require require end called_with = [] Kernel.send :define_method, :require do |path| called_with << path old_require path end yield called_with ensure Kernel.module_eval do @@ -236,6 +243,11 @@ p Foo::Bar alias require old_require undef old_require end end def test_require_implemented_in_ruby_is_called @@ -249,7 +261,8 @@ p Foo::Bar ensure remove_autoload_constant end - assert_equal [file.path], called_with } end end @@ -267,7 +280,8 @@ p Foo::Bar ensure remove_autoload_constant end - assert_equal [a.path, b.path], called_with end end end |