[前][次][番号順一覧][スレッド一覧]

ruby-changes:20990

From: ryan <ko1@a...>
Date: Wed, 24 Aug 2011 07:35:08 +0900 (JST)
Subject: [ruby-changes:20990] ryan:r33039 (trunk): fixed tests broken by new minitest mixin

ryan	2011-08-24 07:34:13 +0900 (Wed, 24 Aug 2011)

  New Revision: 33039

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=33039

  Log:
    fixed tests broken by new minitest mixin

  Modified files:
    trunk/test/ruby/test_module.rb

Index: test/ruby/test_module.rb
===================================================================
--- test/ruby/test_module.rb	(revision 33038)
+++ test/ruby/test_module.rb	(revision 33039)
@@ -79,6 +79,10 @@
     }
   end
 
+  def remove_minitest_mixins(list)
+    list.reject {|c| c.to_s.start_with?("MiniTest") }
+  end
+
   module Mixin
     MIXIN = 1
     def mixin
@@ -217,9 +221,9 @@
     assert_equal([Mixin],            Mixin.ancestors)
 
     assert_equal([Object, Kernel, BasicObject],
-                 remove_rake_mixins(remove_json_mixins(remove_pp_mixins(Object.ancestors))))
+                 remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(Object.ancestors)))))
     assert_equal([String, Comparable, Object, Kernel, BasicObject],
-                 remove_rake_mixins(remove_json_mixins(remove_pp_mixins(String.ancestors))))
+                 remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(String.ancestors)))))
   end
 
   CLASS_EVAL = 2
@@ -277,9 +281,9 @@
     assert_equal([], Mixin.included_modules)
     assert_equal([Mixin], User.included_modules)
     assert_equal([Kernel],
-                 remove_rake_mixins(remove_json_mixins(remove_pp_mixins(Object.included_modules))))
+                 remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(Object.included_modules)))))
     assert_equal([Comparable, Kernel],
-                 remove_rake_mixins(remove_json_mixins(remove_pp_mixins(String.included_modules))))
+                 remove_minitest_mixins(remove_rake_mixins(remove_json_mixins(remove_pp_mixins(String.included_modules)))))
   end
 
   def test_instance_methods

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]