aboutsummaryrefslogtreecommitdiffstats
path: root/spec/engines/memory/integration/joins/cross_engine_spec.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-08-06 10:06:19 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-08-06 10:06:19 -0700
commit09a5847044e63bcc2b391720cf6bf084f03b4501 (patch)
tree3478a267e06385b9ddbb184cdb24e401d1b2ecd5 /spec/engines/memory/integration/joins/cross_engine_spec.rb
parent53db9d80021f399fae312eff935e437a413f8e2d (diff)
downloadrails-09a5847044e63bcc2b391720cf6bf084f03b4501.tar.gz
rails-09a5847044e63bcc2b391720cf6bf084f03b4501.tar.bz2
rails-09a5847044e63bcc2b391720cf6bf084f03b4501.zip
removing test code from implementation
Diffstat (limited to 'spec/engines/memory/integration/joins/cross_engine_spec.rb')
-rw-r--r--spec/engines/memory/integration/joins/cross_engine_spec.rb26
1 files changed, 18 insertions, 8 deletions
diff --git a/spec/engines/memory/integration/joins/cross_engine_spec.rb b/spec/engines/memory/integration/joins/cross_engine_spec.rb
index 091fd2ceda..4646eeba2f 100644
--- a/spec/engines/memory/integration/joins/cross_engine_spec.rb
+++ b/spec/engines/memory/integration/joins/cross_engine_spec.rb
@@ -25,10 +25,15 @@ module Arel
.on(@users[:id].eq(@photos[:user_id])) \
.project(@users[:name], @photos[:camera_id]) \
.tap do |relation|
- relation.call.should == [
- Row.new(relation, ['bryan', @adapter_returns_integer ? 6 : '6']),
- Row.new(relation, ['emilio', @adapter_returns_integer ? 42 : '42'])
- ]
+ rows = relation.call
+ rows.length.should == 2
+ [
+ ['bryan', @adapter_returns_integer ? 6 : '6'],
+ ['emilio', @adapter_returns_integer ? 42 : '42']
+ ].zip(rows).each do |tuple, row|
+ row.relation.should == relation
+ row.tuple.should == tuple
+ end
end
end
end
@@ -40,10 +45,15 @@ module Arel
.on(@users[:id].eq(@photos[:user_id])) \
.project(@users[:name], @photos[:camera_id]) \
.tap do |relation|
- relation.call.should == [
- Row.new(relation, ['bryan', @adapter_returns_integer ? 6 : '6']),
- Row.new(relation, ['emilio', @adapter_returns_integer ? 42 : '42'])
- ]
+ rows = relation.call
+ rows.length.should == 2
+ [
+ ['bryan', @adapter_returns_integer ? 6 : '6'],
+ ['emilio', @adapter_returns_integer ? 42 : '42']
+ ].zip(rows).each do |tuple, row|
+ row.relation.should == relation
+ row.tuple.should == tuple
+ end
end
end
end