aboutsummaryrefslogtreecommitdiffstats
path: root/spec/engines/memory/unit/relations/where_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/engines/memory/unit/relations/where_spec.rb')
-rw-r--r--spec/engines/memory/unit/relations/where_spec.rb18
1 files changed, 11 insertions, 7 deletions
diff --git a/spec/engines/memory/unit/relations/where_spec.rb b/spec/engines/memory/unit/relations/where_spec.rb
index 23aef5766e..c75fe10f1b 100644
--- a/spec/engines/memory/unit/relations/where_spec.rb
+++ b/spec/engines/memory/unit/relations/where_spec.rb
@@ -15,10 +15,12 @@ module Arel
@relation \
.where(@relation[:id].lt(3)) \
.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
@@ -28,9 +30,11 @@ module Arel
.where(@relation[:id].gt(1)) \
.where(@relation[:id].lt(3)) \
.tap do |relation|
- relation.call.should == [
- Row.new(relation, [2, 'duck'])
- ]
+ rows = relation.call
+ rows.length.should == 1
+ row = rows.first
+ row.relation.should == relation
+ row.tuple.should == [2, 'duck']
end
end
end