aboutsummaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-17 14:44:02 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-17 14:44:02 -0700
commit2c5566dbdc239f4fc56dc19ca6e343e091e4d022 (patch)
treec5a427b0bec0de3df8753055dea7ae52a90524b4 /spec
parent2e252c4cc8003489185658db1b76bee69be4a010 (diff)
downloadrails-2c5566dbdc239f4fc56dc19ca6e343e091e4d022.tar.gz
rails-2c5566dbdc239f4fc56dc19ca6e343e091e4d022.tar.bz2
rails-2c5566dbdc239f4fc56dc19ca6e343e091e4d022.zip
cleanup
Diffstat (limited to 'spec')
-rw-r--r--spec/arel/integration/joins/with_adjacency_spec.rb37
1 files changed, 11 insertions, 26 deletions
diff --git a/spec/arel/integration/joins/with_adjacency_spec.rb b/spec/arel/integration/joins/with_adjacency_spec.rb
index 79f6f6d425..ab63fecb46 100644
--- a/spec/arel/integration/joins/with_adjacency_spec.rb
+++ b/spec/arel/integration/joins/with_adjacency_spec.rb
@@ -8,9 +8,9 @@ module Arel
@predicate = @relation1[:id].eq(@relation2[:id])
end
- describe 'when joining a relation to xitself' do
+ describe 'when joining a relation to itself' do
describe '#to_sql' do
- xit 'manufactures sql aliasing the table and attributes properly in the join predicate and the where clause' do
+ it 'manufactures sql aliasing the table and attributes properly in the join predicate and the where clause' do
@relation1.join(@relation2).on(@predicate).to_sql.should be_like("
SELECT `users`.`id`, `users`.`name`, `users_2`.`id`, `users_2`.`name`
FROM `users`
@@ -20,7 +20,7 @@ module Arel
end
describe 'when joining with a selection on the same relation' do
- xit 'manufactures sql aliasing the tables properly' do
+ it 'manufactures sql aliasing the tables properly' do
@relation1 \
.join(@relation2.select(@relation2[:id].eq(1))) \
.on(@predicate) \
@@ -33,7 +33,7 @@ module Arel
end
describe 'when the selection occurs before the alias' do
- xit 'manufactures sql aliasing the predicates properly' do
+ it 'manufactures sql aliasing the predicates properly' do
relation2 = @relation1.select(@relation1[:id].eq(1)).alias
@relation1 \
.join(relation2) \
@@ -45,31 +45,16 @@ module Arel
ON `users_2`.`id` = `users`.`id` AND `users_2`.`id` = 1
")
end
-
- it 'investigation' do
- relation2 = @relation1.select(@relation1[:id].eq(1)).alias
- a = relation2.selects.first.operand1
-
- join = @relation1 \
- .join(relation2) \
- .on(relation2[:id].eq(@relation1[:id])) \
-
- a = a.bind(join)
- a.history # join, select, relation1
- relation2[:id].history # alias, select, relation
-
- p a.history[1].eql?(relation2[:id].history[1])
- end
end
end
- describe 'when joining the relation to xitself multiple times' do
+ describe 'when joining the relation to itself multiple times' do
before do
@relation3 = @relation1.alias
end
describe 'when joining left-associatively' do
- xit 'manufactures sql aliasing the tables properly' do
+ it 'manufactures sql aliasing the tables properly' do
@relation1 \
.join(@relation2 \
.join(@relation3) \
@@ -87,7 +72,7 @@ module Arel
end
describe 'when joining right-associatively' do
- xit 'manufactures sql aliasing the tables properly' do
+ it 'manufactures sql aliasing the tables properly' do
@relation1 \
.join(@relation2).on(@relation1[:id].eq(@relation2[:id])) \
.join(@relation3).on(@relation2[:id].eq(@relation3[:id])) \
@@ -106,7 +91,7 @@ module Arel
describe '[]' do
describe 'when given an attribute belonging to both sub-relations' do
- xit 'disambiguates the relation that serves as the ancestor to the attribute' do
+ it 'disambiguates the relation that serves as the ancestor to the attribute' do
@relation1 \
.join(@relation2) \
.on(@predicate) \
@@ -114,7 +99,7 @@ module Arel
end
describe 'when the left relation is extremely compound' do
- xit 'disambiguates the relation that serves as the ancestor to the attribute' do
+ it 'disambiguates the relation that serves as the ancestor to the attribute' do
@relation1 \
.select(@predicate) \
.select(@predicate) \
@@ -123,7 +108,7 @@ module Arel
.should disambiguate_attributes(@relation1[:id], @relation2[:id])
end
- xit '' do
+ it '' do
r0 = @relation1.select(@predicate)
r1 = r0.alias
r = r0.join(r1).on(@predicate)
@@ -132,7 +117,7 @@ module Arel
end
describe 'when the right relation is extremely compound' do
- xit 'disambiguates the relation that serves as the ancestor to the attribute' do
+ it 'disambiguates the relation that serves as the ancestor to the attribute' do
@relation1 \
.join( \
@relation2 \