From 3c52d91b5dc8b582e03d9ad84e3b97a85273110e Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Wed, 30 Apr 2008 23:44:19 -0700 Subject: my failing test. this is really really hard --- spec/arel/unit/relations/join_spec.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3