diff options
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 |