mongoid/mongoid — pull request #2664 by neerfri (2013-01-03 17:04:06+00:00)
Title: Contextual memory multi field sort

I believe the spec for the multi field sort in ```Mongoid::Contextual::Memory``` was wrong.

Looking at the documentation it seems calling ```context.sort(number: 1, street: 1)``` should sort by number first and only then by street, this should result in the following order:

Street | Number
----------- | ---------
friedel | 1
pfluger | 5
hobrecht | 9

while the spec before this fix expects:

Street | Number
----------- | ---------
friedel | 1
hobrecht | 9
pfluger | 5

I've also taken the time to add Lenaustraße to the test with a conflicting house number to make sure that the second sorting really works. the expected result is then:

Street | Number
----------- | ---------
friedel | 1
lenau | 5
pfluger | 5
hobrecht | 9

Let me know if this requires any other fix or that I was wrong to begin with about the way it should work.

Thanks!