diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-28 14:01:33 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-28 14:01:33 -0700 |
commit | 09b2406e829cee71e4543a75fc4fbe226157d35e (patch) | |
tree | ee8a230c3b9c1d4f31cef38defe269f6b8868859 /spec/arel/unit/primitives | |
parent | 3ae7a601e962468468eac1399ebdfd7113730310 (diff) | |
download | rails-09b2406e829cee71e4543a75fc4fbe226157d35e.tar.gz rails-09b2406e829cee71e4543a75fc4fbe226157d35e.tar.bz2 rails-09b2406e829cee71e4543a75fc4fbe226157d35e.zip |
automatically aliasing tables
Diffstat (limited to 'spec/arel/unit/primitives')
-rw-r--r-- | spec/arel/unit/primitives/attribute_spec.rb | 17 |
1 files changed, 0 insertions, 17 deletions
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 |