spec/engines/memory/unit/relations/array_spec.rb in arel-0.4.0 vs spec/engines/memory/unit/relations/array_spec.rb in arel-1.0.0.rc1
- old
+ new
@@ -19,14 +19,15 @@
end
end
describe '#call' do
it "manufactures an array of hashes of attributes to values" do
- @relation.call.should == [
- Row.new(@relation, [1, 'duck']),
- Row.new(@relation, [2, 'duck']),
- Row.new(@relation, [3, 'goose'])
- ]
+ rows = @relation.call
+ rows.length.should == 3
+ @relation.array.zip(rows).each do |tuple, row|
+ row.relation.should == @relation
+ row.tuple.should == tuple
+ end
end
end
end
end