[macruby-changes] [3558] MacRuby/trunk/spec/macruby/library/dispatch/enumerable_spec.rb

source_changes at macosforge.org source_changes at macosforge.org
Tue Feb 16 17:46:31 PST 2010


Revision: 3558
          http://trac.macosforge.org/projects/ruby/changeset/3558
Author:   ernest.prabhakar at gmail.com
Date:     2010-02-16 17:46:31 -0800 (Tue, 16 Feb 2010)
Log Message:
-----------
Made Dispatch enumerable specs order-independent

Modified Paths:
--------------
    MacRuby/trunk/spec/macruby/library/dispatch/enumerable_spec.rb

Modified: MacRuby/trunk/spec/macruby/library/dispatch/enumerable_spec.rb
===================================================================
--- MacRuby/trunk/spec/macruby/library/dispatch/enumerable_spec.rb	2010-02-17 01:46:12 UTC (rev 3557)
+++ MacRuby/trunk/spec/macruby/library/dispatch/enumerable_spec.rb	2010-02-17 01:46:31 UTC (rev 3558)
@@ -21,7 +21,7 @@
         it "runs the block passing the current index" do
           @count.times { |j| @ary << j }
           @count.p_times { |j| @p_ary << j}
-          @p_ary.should == @ary
+          @p_ary.sort.should == @ary
         end
 
         it "does not run the block if the count is zero" do
@@ -32,25 +32,25 @@
         it "properly combines blocks with even stride > 1" do
           @count.times { |j| @ary << j }
           @count.p_times(2) { |j| @p_ary << j}
-          @p_ary.should == @ary
+          @p_ary.sort.should == @ary
         end
 
         it "properly combines blocks with uneven stride" do
           @count.times { |j| @ary << j }
           @count.p_times(3) { |j| @p_ary << j}
-          @p_ary.should == @ary
+          @p_ary.sort.should == @ary
         end
 
         it "properly rounds stride fraction of 0.5" do
           6.times { |j| @ary << j }
           6.p_times(4) { |j| @p_ary << j}
-          @p_ary.should == @ary
+          @p_ary.sort.should == @ary
         end
 
         it "properly rounds stride fraction > 0.5" do
           7.times { |j| @ary << j }
           7.p_times(4) { |j| @p_ary << j}
-          @p_ary.should == @ary
+          @p_ary.sort.should == @ary
         end
       end
     end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100216/779c79eb/attachment.html>


More information about the macruby-changes mailing list