spec/bsearch_spec.rb in simply_useful-0.2.1 vs spec/bsearch_spec.rb in simply_useful-0.2.2
- old
+ new
@@ -28,13 +28,13 @@
end
end
describe ".bsearch" do
it "should return the first position of an object" do
- @array_with_duplicates.bsearch{|x| x <=> 1}.should == 0
- @array_with_duplicates.bsearch{|x| x <=> 3}.should == 3
- @array_with_duplicates.bsearch{|x| x <=> 4}.should == 4
- @array_with_duplicates.bsearch{|x| x <=> 14}.should == @array_with_duplicates.length-3
+ @array_with_duplicates.bsearch_first{|x| x <=> 1}.should == 0
+ @array_with_duplicates.bsearch_first{|x| x <=> 3}.should == 3
+ @array_with_duplicates.bsearch_first{|x| x <=> 4}.should == 4
+ @array_with_duplicates.bsearch_first{|x| x <=> 14}.should == @array_with_duplicates.length-3
end
end
describe ".bsearch_last" do
it "should return the last position of an object" do
\ No newline at end of file