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

ruby-changes:26538

From: naruse <ko1@a...>
Date: Tue, 25 Dec 2012 10:20:35 +0900 (JST)
Subject: [ruby-changes:26538] naruse:r38589 (trunk): Fix test to avoid failure from the order of Dir.foreach

naruse	2012-12-25 10:20:17 +0900 (Tue, 25 Dec 2012)

  New Revision: 38589

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

  Log:
    Fix test to avoid failure from the order of Dir.foreach
    
    The order of Dir.foreach, which is internally used in Pathname), is not
    stable.

  Modified files:
    trunk/test/rubygems/test_gem_doctor.rb

Index: test/rubygems/test_gem_doctor.rb
===================================================================
--- test/rubygems/test_gem_doctor.rb	(revision 38588)
+++ test/rubygems/test_gem_doctor.rb	(revision 38589)
@@ -61,7 +61,7 @@ Removed file specifications/c-2.gemspec https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_doctor.rb#L61
 
     OUTPUT
 
-    assert_equal expected, @ui.output
+    assert_equal expected.lines.sort, @ui.output.lines.sort
 
     assert_equal Gem.dir,  @userhome
     assert_equal Gem.path, [@gemhome, @userhome]
@@ -114,7 +114,7 @@ Extra file specifications/c-2.gemspec https://github.com/ruby/ruby/blob/trunk/test/rubygems/test_gem_doctor.rb#L114
 
     OUTPUT
 
-    assert_equal expected, @ui.output
+    assert_equal expected.lines.sort, @ui.output.lines.sort
 
     assert_equal Gem.dir,  @userhome
     assert_equal Gem.path, [@gemhome, @userhome]

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

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