diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-28 14:03:36 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-28 14:03:36 -0700 |
commit | 57d6bce28b07f864c97a7b58d758fd5621196b00 (patch) | |
tree | 7d95dfe77c48452af8970f8e6da2ed6ee37350ce /spec/arel | |
parent | 09b2406e829cee71e4543a75fc4fbe226157d35e (diff) | |
download | rails-57d6bce28b07f864c97a7b58d758fd5621196b00.tar.gz rails-57d6bce28b07f864c97a7b58d758fd5621196b00.tar.bz2 rails-57d6bce28b07f864c97a7b58d758fd5621196b00.zip |
improved messaging in test
Diffstat (limited to 'spec/arel')
-rw-r--r-- | spec/arel/unit/relations/join_spec.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/spec/arel/unit/relations/join_spec.rb b/spec/arel/unit/relations/join_spec.rb index 15c00a4f24..b14d951aae 100644 --- a/spec/arel/unit/relations/join_spec.rb +++ b/spec/arel/unit/relations/join_spec.rb @@ -145,8 +145,7 @@ module Arel describe 'when joining the same relation to itself' do describe '#to_sql' do - it 'aliases the table and attributes properly in selects' - it 'aliases the table and attributes properly in the join predicate' do + it 'aliases the table and attributes properly in the join predicate and the where clause' do @relation1.join(@aliased_relation).on(@relation1[:id].eq(@aliased_relation[:id])).to_sql.should be_like(" SELECT `users`.`id`, `users`.`name`, `users_2`.`id`, `users_2`.`name` FROM `users` @@ -158,7 +157,7 @@ module Arel describe '[]' do describe 'when given an attribute belonging to both sub-relations' do - it 'disambiguates the ...' do + it 'disambiguates the relation that serves as the ancestor to the attribute' do relation = @relation1.join(@aliased_relation).on(@relation1[:id].eq(@aliased_relation[:id])) relation[@relation1[:id]].ancestor.should == @relation1[:id] relation[@aliased_relation[:id]].ancestor.should == @aliased_relation[:id] |