diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-13 17:03:03 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-04-13 17:03:03 -0700 |
commit | 4466409205d697f854f98ac0908a792a1601ecc6 (patch) | |
tree | fd9bf6fc371437a58417caf9393d9a84fa5708d1 /spec | |
parent | 2f9b70b6179d0b66f80d6edd3eca1017aec70659 (diff) | |
download | rails-4466409205d697f854f98ac0908a792a1601ecc6.tar.gz rails-4466409205d697f854f98ac0908a792a1601ecc6.tar.bz2 rails-4466409205d697f854f98ac0908a792a1601ecc6.zip |
adjacency lists work
- implementation is a bit complex, but i can't think of anything simpler
Diffstat (limited to 'spec')
-rw-r--r-- | spec/active_relation/unit/primitives/attribute_spec.rb | 1 | ||||
-rw-r--r-- | spec/active_relation/unit/relations/join_spec.rb | 3 |
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/active_relation/unit/primitives/attribute_spec.rb b/spec/active_relation/unit/primitives/attribute_spec.rb index 08ed6d3621..471ae91b5b 100644 --- a/spec/active_relation/unit/primitives/attribute_spec.rb +++ b/spec/active_relation/unit/primitives/attribute_spec.rb @@ -52,6 +52,7 @@ module ActiveRelation describe Attribute::Congruence do describe '=~' do + it "obtains if the attributes are identical" do Attribute.new(@relation, :name).should =~ Attribute.new(@relation, :name) end diff --git a/spec/active_relation/unit/relations/join_spec.rb b/spec/active_relation/unit/relations/join_spec.rb index 5d554cd9ab..22b0a9f237 100644 --- a/spec/active_relation/unit/relations/join_spec.rb +++ b/spec/active_relation/unit/relations/join_spec.rb @@ -146,12 +146,11 @@ module ActiveRelation describe 'when joining aliased relations' do it 'aliases the table and attributes properly' do - pending aliased_relation = @relation1.as(:alias) @relation1.join(aliased_relation).on(@relation1[:id].eq(aliased_relation[:id])).to_sql.should be_like(" SELECT `users`.`id`, `users`.`name`, `alias`.`id`, `alias`.`name` FROM `users` - INNER JOIN `alias` + INNER JOIN `users` AS `alias` ON `users`.`id` = `alias`.`id` ") end |