From d3b5357d5ff1a2f1d6e4a212e768412da4fde2d2 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Sat, 13 Jan 2007 19:12:41 +0000 Subject: Allow bind parameters to be specified without a leading colon. Also allow them to be specified as a symbol. --- test/tc_integration.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test') 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 -- cgit