Skip to content

Commit f3920ee

Browse files
committed
Merge pull request kanwei#22 from ysksn/master
small re-factoring
2 parents 8253fc6 + 44407c0 commit f3920ee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spec/heap_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
before(:each) do
3939
@random_array = []
4040
@num_items = 100
41-
@num_items.times { |x| @random_array << rand(@num_items) }
41+
@num_items.times { @random_array << rand(@num_items) }
4242
@heap = Containers::MaxHeap.new(@random_array)
4343
end
4444

spec/sort_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
it "should work for a container of size 1" do
1717
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]) }
1919
end
2020

2121
it "should work for random arrays of numbers" do
@@ -26,4 +26,4 @@
2626
@sorts.each { |sort| Sort.send(sort, rand_array.dup).should eql(sorted_array) }
2727
end
2828

29-
end
29+
end

0 commit comments

Comments
 (0)