aboutsummaryrefslogtreecommitdiffstats
path: root/spec/active_relation/unit/relations/update_spec.rb
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-03-02 21:10:35 -0800
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-03-02 21:10:35 -0800
commit6647a1e08eb9dc3512628882bcf60d421df74228 (patch)
tree204eebc8e9c6e6711331706dbd14815164db2eda /spec/active_relation/unit/relations/update_spec.rb
parentc54392872f024d55e8a23ead3065e6119a52b234 (diff)
downloadrails-6647a1e08eb9dc3512628882bcf60d421df74228.tar.gz
rails-6647a1e08eb9dc3512628882bcf60d421df74228.tar.bz2
rails-6647a1e08eb9dc3512628882bcf60d421df74228.zip
scalars are now lifted; the heavy lifting is done by the operations on relation (select, join, etc.)
Diffstat (limited to 'spec/active_relation/unit/relations/update_spec.rb')
-rw-r--r--spec/active_relation/unit/relations/update_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/active_relation/unit/relations/update_spec.rb b/spec/active_relation/unit/relations/update_spec.rb
index 2cd3eb9d11..cad14fd5ec 100644
--- a/spec/active_relation/unit/relations/update_spec.rb
+++ b/spec/active_relation/unit/relations/update_spec.rb
@@ -8,14 +8,14 @@ module ActiveRelation
describe '#to_sql' do
it 'manufactures sql updating attributes' do
- Update.new(@relation, @relation[:name] => "nick").to_sql.should be_like("
+ Update.new(@relation, @relation[:name] => "nick".bind(@relation)).to_sql.should be_like("
UPDATE `users`
SET `users`.`name` = 'nick'
")
end
it 'manufactures sql updating a selection relation' do
- Update.new(@relation.select(@relation[:id].equals(1)), @relation[:name] => "nick").to_sql.should be_like("
+ Update.new(@relation.select(@relation[:id].equals(1)), @relation[:name] => "nick".bind(@relation)).to_sql.should be_like("
UPDATE `users`
SET `users`.`name` = 'nick'
WHERE `users`.`id` = 1