From 09b2406e829cee71e4543a75fc4fbe226157d35e Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Mon, 28 Apr 2008 14:01:33 -0700 Subject: automatically aliasing tables --- spec/arel/unit/primitives/attribute_spec.rb | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'spec/arel/unit/primitives') diff --git a/spec/arel/unit/primitives/attribute_spec.rb b/spec/arel/unit/primitives/attribute_spec.rb index ac9afa85c7..561c47da16 100644 --- a/spec/arel/unit/primitives/attribute_spec.rb +++ b/spec/arel/unit/primitives/attribute_spec.rb @@ -38,12 +38,6 @@ module Arel end end - describe '#qualified_name' do - it "manufactures an attribute name prefixed with the relation's name" do - @attribute.qualified_name.should == "#{@relation.prefix_for(@attribute)}.id" - end - end - describe '#engine' do it "delegates to its relation" do Attribute.new(@relation, :id).engine.should == @relation.engine @@ -77,17 +71,6 @@ module Arel @attribute.to_sql.should be_like("`users`.`id`") end end - - describe 'for an attribute in a join relation where the source relation is aliased' do - before do - another_relation = Table.new(:photos) - @join_with_alias = @relation.as(:alias).join(another_relation).on(@relation[:id].eq(another_relation[:user_id])) - end - - it "manufactures sql with an alias" do - @join_with_alias[@attribute].to_sql.should be_like("`alias`.`id`") - end - end end describe Attribute::Predications do -- cgit v1.2.3