diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-16 12:32:59 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-16 12:32:59 -0700 |
commit | 6a0097468213e928f477f638ec53e9efa396febe (patch) | |
tree | 6c68d5c95d66a5896aed259ee22a92a8fbfe8591 /spec | |
parent | 71bb593fb240f8e49931b3e3415a827900a032fd (diff) | |
download | rails-6a0097468213e928f477f638ec53e9efa396febe.tar.gz rails-6a0097468213e928f477f638ec53e9efa396febe.tar.bz2 rails-6a0097468213e928f477f638ec53e9efa396febe.zip |
some cleanup, notes for further cleanup/investigation
Diffstat (limited to 'spec')
-rw-r--r-- | spec/arel/integration/joins/with_adjacency_spec.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/spec/arel/integration/joins/with_adjacency_spec.rb b/spec/arel/integration/joins/with_adjacency_spec.rb index eaa0b6cdf5..74d461319c 100644 --- a/spec/arel/integration/joins/with_adjacency_spec.rb +++ b/spec/arel/integration/joins/with_adjacency_spec.rb @@ -22,7 +22,7 @@ module Arel describe 'when joining with a selection on the same relation' do it 'manufactures sql aliasing the tables properly' do @relation1 \ - .join(@relation2.select(@relation2[:id].eq(1))) \ + .join(@relation2.select(@relation2[:id].eq(1))) \ .on(@predicate) \ .to_sql.should be_like(" SELECT `users`.`id`, `users`.`name`, `users_2`.`id`, `users_2`.`name` @@ -35,8 +35,8 @@ module Arel describe 'when the selection occurs before the alias' do it 'manufactures sql aliasing the predicates properly' do relation2 = @relation1.select(@relation1[:id].eq(1)).alias - @relation1 \ - .join(relation2) \ + @relation1 \ + .join(relation2) \ .on(relation2[:id].eq(@relation1[:id])) \ .to_sql.should be_like(" SELECT `users`.`id`, `users`.`name`, `users_2`.`id`, `users_2`.`name` @@ -55,8 +55,10 @@ module Arel describe 'when joining left-associatively' do it 'manufactures sql aliasing the tables properly' do - @relation1 \ - .join(@relation2.join(@relation3).on(@relation2[:id].eq(@relation3[:id]))) \ + @relation1 \ + .join(@relation2 \ + .join(@relation3) \ + .on(@relation2[:id].eq(@relation3[:id]))) \ .on(@relation1[:id].eq(@relation2[:id])) \ .to_sql.should be_like(" SELECT `users`.`id`, `users`.`name`, `users_2`.`id`, `users_2`.`name`, `users_3`.`id`, `users_3`.`name` |