From 57d6bce28b07f864c97a7b58d758fd5621196b00 Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Mon, 28 Apr 2008 14:03:36 -0700 Subject: improved messaging in test --- spec/arel/unit/relations/join_spec.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'spec') 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] -- cgit v1.2.3