Skip to content

Commit

Permalink
Merge pull request kanwei#22 from ysksn/master
Browse files Browse the repository at this point in the history
small re-factoring
  • Loading branch information
kanwei committed Sep 2, 2013
2 parents 8253fc6 + 44407c0 commit f3920ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/heap_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions spec/sort_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.