diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-01-16 22:55:06 -0800 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-01-16 22:55:06 -0800 |
commit | b47ac80a17d7a74e1b5deac0e63a72960a4da453 (patch) | |
tree | de13e27979148c8a39c396298cc789348d4acb2e /spec/active_relation/primitives/attribute_spec.rb | |
parent | b5a2057fcd5dfcac3682a565f2ba15281f5dcbb2 (diff) | |
download | rails-b47ac80a17d7a74e1b5deac0e63a72960a4da453.tar.gz rails-b47ac80a17d7a74e1b5deac0e63a72960a4da453.tar.bz2 rails-b47ac80a17d7a74e1b5deac0e63a72960a4da453.zip |
adding grouping functionality; added some dummy code ("Schmoin") for experimenting with aggregate joins. need to resolve the ambiguity in the #as operator between (SELECT * FROM foo AS bar) vs. (SELECT * FROM foo) AS bar
Diffstat (limited to 'spec/active_relation/primitives/attribute_spec.rb')
-rw-r--r-- | spec/active_relation/primitives/attribute_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/active_relation/primitives/attribute_spec.rb b/spec/active_relation/primitives/attribute_spec.rb index 6078da08f3..543217b9cf 100644 --- a/spec/active_relation/primitives/attribute_spec.rb +++ b/spec/active_relation/primitives/attribute_spec.rb @@ -12,6 +12,12 @@ module ActiveRelation @relation1[:id].as(:alias).should == Attribute.new(@relation1, :id, :alias) end end + + describe '#substitute' do + it "manufactures an attribute with the relation substituted" do + @relation1[:id].substitute(@relation2).should == Attribute.new(@relation2, :id) + end + end describe '#qualified_name' do it "manufactures an attribute name prefixed with the relation's name" do |