Not 100% about this..
Overwriting `Array` in tests means that this patch will leaky to all other tests, and could cause mysterious bugs in the future.
Maybe you could do a private function in the test class, that receives the array and return them sorted. example:
```ruby
def sort_docs(array)
  array.sort{|a,b| [a.keys, a.values] <=> [b.keys, b.values]}
end
```

Not a big deal though.