diff options
Diffstat (limited to 'spec/active_relation/relations/compound_spec.rb')
-rw-r--r-- | spec/active_relation/relations/compound_spec.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/spec/active_relation/relations/compound_spec.rb b/spec/active_relation/relations/compound_spec.rb index bb2919a318..b0f122ca97 100644 --- a/spec/active_relation/relations/compound_spec.rb +++ b/spec/active_relation/relations/compound_spec.rb @@ -17,37 +17,5 @@ module ActiveRelation @compound_relation.attributes.should == @relation.attributes.collect { |a| a.bind(@compound_relation) } end end - - describe '[]' do - describe 'when given a', Symbol do - it 'manufactures attributes associated with the compound relation if the symbol names an attribute within the relation' do - @compound_relation[:id].should == @relation[:id].bind(@compound_relation) - @compound_relation[:does_not_exist].should be_nil - end - end - - describe 'when given an', Attribute do - it "manufactures a bindd attribute when given an attribute within the relation" do - @compound_relation[@relation[:id]].should == @relation[:id].bind(@compound_relation) - @compound_relation[@compound_relation[:id]].should == @compound_relation[:id] - pending "test nil" - end - end - - describe 'when given an', Expression do - before do - @nested_expression = Expression.new(Attribute.new(@relation, :id), "COUNT") - @nested_relation = Aggregation.new(@relation, :expressions => [@nested_expression]) - @unprojected_expression = Expression.new(Attribute.new(@relation, :id), "SUM") - @compound_relation = ConcreteCompound.new(@nested_relation) - end - - it "manufactures a bindd Expression when given an Expression within the relation" do - @compound_relation[@nested_expression].should == @nested_relation[@nested_expression].bind(@compound_relation) - @compound_relation[@compound_relation[@expression]].should == @compound_relation[@expression] - @compound_relation[@unprojected_expression].should be_nil - end - end - end end end
\ No newline at end of file |