diff options
Diffstat (limited to 'spec/engines/memory/unit/relations/take_spec.rb')
-rw-r--r-- | spec/engines/memory/unit/relations/take_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/engines/memory/unit/relations/take_spec.rb b/spec/engines/memory/unit/relations/take_spec.rb index f74f1a74c8..b7e49ddca6 100644 --- a/spec/engines/memory/unit/relations/take_spec.rb +++ b/spec/engines/memory/unit/relations/take_spec.rb @@ -15,10 +15,12 @@ module Arel @relation \ .take(2) \ .tap do |relation| - relation.call.should == [ - Row.new(relation, [1, 'duck']), - Row.new(relation, [2, 'duck']), - ] + rows = relation.call + rows.length.should == 2 + rows.each_with_index do |row, i| + row.relation.should == relation + row.tuple.should == [i + 1, 'duck'] + end end end end |