spec/engines/memory/unit/relations/take_spec.rb in arel-0.4.0 vs spec/engines/memory/unit/relations/take_spec.rb in arel-1.0.0.rc1
- old
+ new
@@ -12,14 +12,16 @@
describe '#call' do
it 'removes the rows after the first n' do
@relation \
.take(2) \
- .let do |relation|
- relation.call.should == [
- Row.new(relation, [1, 'duck']),
- Row.new(relation, [2, 'duck']),
- ]
+ .tap do |relation|
+ 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
end
end