diff options
Diffstat (limited to 'spec/engines/memory/unit/relations/order_spec.rb')
-rw-r--r-- | spec/engines/memory/unit/relations/order_spec.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/spec/engines/memory/unit/relations/order_spec.rb b/spec/engines/memory/unit/relations/order_spec.rb index 0d746bcd0a..86c59ffc46 100644 --- a/spec/engines/memory/unit/relations/order_spec.rb +++ b/spec/engines/memory/unit/relations/order_spec.rb @@ -15,11 +15,12 @@ module Arel @relation \ .order(@relation[:id].desc) \ .tap do |relation| - relation.call.should == [ - Row.new(relation, [3, 'goose']), - Row.new(relation, [2, 'duck' ]), - Row.new(relation, [1, 'duck' ]) - ] + rows = relation.call + rows.length.should == 3 + @relation.array.reverse.zip(rows) do |tuple, row| + row.relation.should == relation + row.tuple.should == tuple + end end end end |