Skip to content
This repository
Browse code

Merge pull request #22 from ysksn/master

small re-factoring
  • Loading branch information...
commit f3920ee34e3183ec0284d80ee8f870e0ecc31c04 2 parents 8253fc6 + 44407c0
Kanwei Li authored
2  spec/heap_spec.rb
@@ -38,7 +38,7 @@
38 38
     before(:each) do
39 39
       @random_array = []
40 40
       @num_items = 100
41  
-      @num_items.times { |x| @random_array << rand(@num_items) }
  41
+      @num_items.times { @random_array << rand(@num_items) }
42 42
       @heap = Containers::MaxHeap.new(@random_array)
43 43
     end
44 44
     
4  spec/sort_spec.rb
@@ -15,7 +15,7 @@
15 15
 
16 16
   it "should work for a container of size 1" do
17 17
     one_array = [1]
18  
-    @sorts.each { |sort| Sort.send(sort, one_array).should eql(one_array) }
  18
+    @sorts.each { |sort| Sort.send(sort, one_array).should eql([1]) }
19 19
   end
20 20
 
21 21
   it "should work for random arrays of numbers" do
@@ -26,4 +26,4 @@
26 26
     @sorts.each { |sort| Sort.send(sort, rand_array.dup).should eql(sorted_array) }
27 27
   end    
28 28
 
29  
-end
  29
+end

0 notes on commit f3920ee

Please sign in to comment.
Something went wrong with that request. Please try again.