diff options
author | Jamis Buck <jamis@37signals.com> | 2007-01-13 19:12:41 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2007-01-13 19:12:41 +0000 |
commit | d3b5357d5ff1a2f1d6e4a212e768412da4fde2d2 (patch) | |
tree | 806bad59220e70fdeb211d9cf07121af96ad568e /test | |
parent | 12953284d8a3e171c9a029ab11a47167df304b55 (diff) | |
download | third_party-sqlite3-ruby-d3b5357d5ff1a2f1d6e4a212e768412da4fde2d2.tar.gz third_party-sqlite3-ruby-d3b5357d5ff1a2f1d6e4a212e768412da4fde2d2.tar.xz third_party-sqlite3-ruby-d3b5357d5ff1a2f1d6e4a212e768412da4fde2d2.zip |
Allow bind parameters to be specified without a leading colon. Also allow them to be specified as a symbol.
Diffstat (limited to 'test')
-rw-r--r-- | test/tc_integration.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/tc_integration.rb b/test/tc_integration.rb index 664d216..70458b9 100644 --- a/test/tc_integration.rb +++ b/test/tc_integration.rb @@ -709,6 +709,16 @@ module Integration assert_equal 1, @stmt.execute!.length end + define_method( "test_bind_params_hash_without_colon" ) do + @stmt.bind_params "named" => 2 + assert_equal 1, @stmt.execute!.length + end + + define_method( "test_bind_params_hash_as_symbol" ) do + @stmt.bind_params :named => 2 + assert_equal 1, @stmt.execute!.length + end + define_method( "test_bind_params_mixed" ) do @stmt.bind_params( 1, ":named" => 2 ) assert_equal 2, @stmt.execute!.length |