mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Update to ruby/spec@9be7c7e
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64180 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
aeeaadaad0
commit
b53cf149ad
246 changed files with 9108 additions and 548 deletions
|
@ -32,5 +32,12 @@ describe "Enumerable#sort_by" do
|
|||
b.sort_by{ |x| -x }.should == [3, 2, 1]
|
||||
end
|
||||
|
||||
it "calls #each to iterate over the elements to be sorted" do
|
||||
b = EnumerableSpecs::Numerous.new( 1, 2, 3 )
|
||||
b.should_receive(:each).once.and_yield(1).and_yield(2).and_yield(3)
|
||||
b.should_not_receive :map
|
||||
b.sort_by { |x| -x }.should == [3, 2, 1]
|
||||
end
|
||||
|
||||
it_behaves_like :enumerable_enumeratorized_with_origin_size, :sort_by
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue