diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-12 16:43:48 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-12 16:43:48 -0700 |
commit | 1b8f72746b38ce1e08b5fab48f3251eb09f2cba0 (patch) | |
tree | 3782ef3e88474bb6d79ba3e25b08b235fca78040 /spec/active_relation/unit/relations/table_spec.rb | |
parent | 6de1f350ce117129e46353f12f90a138ca3d3ead (diff) | |
download | rails-1b8f72746b38ce1e08b5fab48f3251eb09f2cba0.tar.gz rails-1b8f72746b38ce1e08b5fab48f3251eb09f2cba0.tar.bz2 rails-1b8f72746b38ce1e08b5fab48f3251eb09f2cba0.zip |
- removed #qualify and #descend helper
- qualify seems no longer neccessary since everything is fully qualified
- finished pending specs
Diffstat (limited to 'spec/active_relation/unit/relations/table_spec.rb')
-rw-r--r-- | spec/active_relation/unit/relations/table_spec.rb | 11 |
1 files changed, 2 insertions, 9 deletions
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)) |