aboutsummaryrefslogtreecommitdiffstats
path: root/spec/arel/integration/joins/with_compounds_spec.rb
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-19 13:49:43 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-19 13:49:43 -0700
commit3eae3b08eef84237c201a2f7bfc5292dbbe6951c (patch)
treef2bab85c6a7af1f60b7a03bb7a116d2bf681a8dc /spec/arel/integration/joins/with_compounds_spec.rb
parent14210279b23788d47a18f0615f5e20234550c8ac (diff)
downloadrails-3eae3b08eef84237c201a2f7bfc5292dbbe6951c.tar.gz
rails-3eae3b08eef84237c201a2f7bfc5292dbbe6951c.tar.bz2
rails-3eae3b08eef84237c201a2f7bfc5292dbbe6951c.zip
renamed select operation to where
Diffstat (limited to 'spec/arel/integration/joins/with_compounds_spec.rb')
-rw-r--r--spec/arel/integration/joins/with_compounds_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/arel/integration/joins/with_compounds_spec.rb b/spec/arel/integration/joins/with_compounds_spec.rb
index 62d226acf2..3c17ab315d 100644
--- a/spec/arel/integration/joins/with_compounds_spec.rb
+++ b/spec/arel/integration/joins/with_compounds_spec.rb
@@ -9,11 +9,11 @@ module Arel
end
describe '#to_sql' do
- describe 'when the join contains a select' do
- describe 'and the select is given a string' do
+ describe 'when the join contains a where' do
+ describe 'and the where is given a string' do
it 'does not escape the string' do
@relation1 \
- .join(@relation2.select("asdf")) \
+ .join(@relation2.where("asdf")) \
.on(@predicate) \
.to_sql.should be_like("
SELECT `users`.`id`, `users`.`name`, `photos`.`id`, `photos`.`user_id`, `photos`.`camera_id`
@@ -26,13 +26,13 @@ module Arel
end
describe 'when a compound contains a join' do
- describe 'and the compound is a select' do
+ describe 'and the compound is a where' do
it 'manufactures sql disambiguating the tables' do
@relation1 \
- .select(@relation1[:id].eq(1)) \
+ .where(@relation1[:id].eq(1)) \
.join(@relation2) \
.on(@predicate) \
- .select(@relation1[:id].eq(1)) \
+ .where(@relation1[:id].eq(1)) \
.to_sql.should be_like("
SELECT `users`.`id`, `users`.`name`, `photos`.`id`, `photos`.`user_id`, `photos`.`camera_id`
FROM `users`