From 1b8f72746b38ce1e08b5fab48f3251eb09f2cba0 Mon Sep 17 00:00:00 2001 From: Nick Kallen Date: Sat, 12 Apr 2008 16:43:48 -0700 Subject: - removed #qualify and #descend helper - qualify seems no longer neccessary since everything is fully qualified - finished pending specs --- spec/active_relation/unit/relations/table_spec.rb | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'spec/active_relation/unit/relations/table_spec.rb') diff --git a/spec/active_relation/unit/relations/table_spec.rb b/spec/active_relation/unit/relations/table_spec.rb index 6286ea9de1..2751d9cb63 100644 --- a/spec/active_relation/unit/relations/table_spec.rb +++ b/spec/active_relation/unit/relations/table_spec.rb @@ -46,8 +46,8 @@ module ActiveRelation end describe '#column_for' do - it "" do - @relation[:id].column.should == @relation.columns.detect { |c| c.name == 'id' } + it "returns the column corresponding to the attribute" do + @relation.column_for(@relation[:id]).should == @relation.columns.detect { |c| c.name == 'id' } end end @@ -68,19 +68,12 @@ module ActiveRelation describe '#reset' do it "reloads columns from the database" do - pending lambda { stub(@relation.engine).columns { [] } }.should_not change { @relation.attributes } lambda { @relation.reset }.should change { @relation.attributes } end end end - describe '#qualify' do - it 'manufactures a rename relation with all attribute names qualified' do - @relation.qualify.should == Rename.new(@relation, @relation[:name] => 'users.name', @relation[:id] => 'users.id') - end - end - describe 'hashing' do it "implements hash equality" do Table.new(:users).should hash_the_same_as(Table.new(:users)) -- cgit v1.2.3