diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-02-11 23:09:15 -0800 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-02-11 23:09:15 -0800 |
commit | 0d70ce37e510c83d5fc42f88b04314f40d87fe96 (patch) | |
tree | 03183df1b69ebb31bd5148bc8a9443647348ff3a /spec/active_relation/primitives/attribute_spec.rb | |
parent | 82cd330dbac31d79e23cc06273321ecbac2b9077 (diff) | |
download | rails-0d70ce37e510c83d5fc42f88b04314f40d87fe96.tar.gz rails-0d70ce37e510c83d5fc42f88b04314f40d87fe96.tar.bz2 rails-0d70ce37e510c83d5fc42f88b04314f40d87fe96.zip |
rename substitute to bind since it 'binds' an object to a new relation.
Diffstat (limited to 'spec/active_relation/primitives/attribute_spec.rb')
-rw-r--r-- | spec/active_relation/primitives/attribute_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/active_relation/primitives/attribute_spec.rb b/spec/active_relation/primitives/attribute_spec.rb index e79f0c994d..ecc9014658 100644 --- a/spec/active_relation/primitives/attribute_spec.rb +++ b/spec/active_relation/primitives/attribute_spec.rb @@ -17,14 +17,14 @@ module ActiveRelation end end - describe '#substitute' do - it "manufactures an attribute with the relation substituted and self as an ancestor" do + describe '#bind' do + it "manufactures an attribute with the relation bindd and self as an ancestor" do derived_relation = @relation.select(@relation[:id].equals(1)) - @attribute.substitute(derived_relation).should == Attribute.new(derived_relation, @attribute.name, nil, @attribute) + @attribute.bind(derived_relation).should == Attribute.new(derived_relation, @attribute.name, nil, @attribute) end it "returns self if the substituting to the same relation" do - @attribute.substitute(@relation).should == @attribute + @attribute.bind(@relation).should == @attribute end end |