aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-04-30 23:44:19 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-04-30 23:44:19 -0700
commit3c52d91b5dc8b582e03d9ad84e3b97a85273110e (patch)
treeb976e3e6375b523754ad626f953ef2e5d6311b73 /spec
parentf48c642852b5bb6be62dbbc7502d34b64e53716b (diff)
downloadrails-3c52d91b5dc8b582e03d9ad84e3b97a85273110e.tar.gz
rails-3c52d91b5dc8b582e03d9ad84e3b97a85273110e.tar.bz2
rails-3c52d91b5dc8b582e03d9ad84e3b97a85273110e.zip
my failing test. this is really really hard
Diffstat (limited to 'spec')
-rw-r--r--spec/arel/unit/relations/join_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/arel/unit/relations/join_spec.rb b/spec/arel/unit/relations/join_spec.rb
index c3f33e1ae7..f74bd32ef8 100644
--- a/spec/arel/unit/relations/join_spec.rb
+++ b/spec/arel/unit/relations/join_spec.rb
@@ -149,7 +149,14 @@ module Arel
@relation1 \
.join(@relation1.alias.join(@relation1.alias).on(@relation1[:id].eq(1))) \
.on(@relation1[:id].eq(1)) \
- .to_sql.should be_like("")
+ .to_sql.should be_like("
+ SELECT `users`.`id`, `users`.`name`, `users_2`.`id`, `users_2`.`name`, `users_3`.`id`, `users_3`.`name`
+ FROM `users`
+ INNER JOIN `users` AS `users_2`
+ ON `users`.`id` = 1
+ INNER JOIN `users` AS `users_3`
+ ON `users`.`id` = 1
+ ")
end
it 'aliases the table and attributes properly in the join predicate and the where clause' do