Permalink
Browse files

Merge pull request #22 from ysksn/master

small re-factoring
  • Loading branch information...
2 parents 8253fc6 + 44407c0 commit f3920ee34e3183ec0284d80ee8f870e0ecc31c04 @kanwei committed Sep 2, 2013
Showing with 3 additions and 3 deletions.
  1. +1 −1 spec/heap_spec.rb
  2. +2 −2 spec/sort_spec.rb
View
@@ -38,7 +38,7 @@
before(:each) do
@random_array = []
@num_items = 100
- @num_items.times { |x| @random_array << rand(@num_items) }
+ @num_items.times { @random_array << rand(@num_items) }
@heap = Containers::MaxHeap.new(@random_array)
end
View
@@ -15,7 +15,7 @@
it "should work for a container of size 1" do
one_array = [1]
- @sorts.each { |sort| Sort.send(sort, one_array).should eql(one_array) }
+ @sorts.each { |sort| Sort.send(sort, one_array).should eql([1]) }
end
it "should work for random arrays of numbers" do
@@ -26,4 +26,4 @@
@sorts.each { |sort| Sort.send(sort, rand_array.dup).should eql(sorted_array) }
end
-end
+end

0 comments on commit f3920ee

Please sign in to comment.