aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorMarcel Molina <marcel@vernix.org>2005-10-14 23:28:35 +0000
committerMarcel Molina <marcel@vernix.org>2005-10-14 23:28:35 +0000
commit6a6df5f1e297a1b93233acbd851f123232ce1acf (patch)
treeed3ac6a0a1d5cdd6649d8c39bba910e09a8e9adc /activerecord/test
parentf2c7634db58b52f8d0415a7002976089fea3191c (diff)
downloadrails-6a6df5f1e297a1b93233acbd851f123232ce1acf.tar.gz
rails-6a6df5f1e297a1b93233acbd851f123232ce1acf.tar.bz2
rails-6a6df5f1e297a1b93233acbd851f123232ce1acf.zip
Change quote delimiters for sql interpolation to obviate SyntaxErrors. Closes 2215. [leroen@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2593 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test')
-rwxr-xr-xactiverecord/test/base_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/base_test.rb b/activerecord/test/base_test.rb
index c7e795c0e6..9b5ce8a8ce 100755
--- a/activerecord/test/base_test.rb
+++ b/activerecord/test/base_test.rb
@@ -1018,6 +1018,12 @@ class BasicsTest < Test::Unit::TestCase
assert_equal firm.clients.collect{ |x| x.name }.sort, clients.collect{ |x| x.name }.sort
end
+ def test_interpolate_sql
+ assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo@bar') }
+ assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo bar) baz') }
+ assert_nothing_raised { Category.new.send(:interpolate_sql, 'foo bar} baz') }
+ end
+
private
def assert_readers(model, exceptions)