Skip to content

Commit

Permalink
adding test_deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed May 12, 2010
1 parent 1a26f72 commit 97445a1
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Manifest.txt
Expand Up @@ -28,10 +28,13 @@ lib/sqlite3/value.rb
lib/sqlite3/version.rb
setup.rb
tasks/faq.rake
tasks/gem.rake
tasks/native.rake
tasks/vendor_sqlite3.rake
test/helper.rb
test/test_database.rb
test/test_deprecated.rb
test/test_encoding.rb
test/test_integration.rb
test/test_integration_open_close.rb
test/test_integration_pending.rb
Expand Down
25 changes: 25 additions & 0 deletions test/test_deprecated.rb
@@ -0,0 +1,25 @@
require 'helper'

module SQLite3
class TestDeprecated < Test::Unit::TestCase
def setup
@db = SQLite3::Database.new(':memory:')
end

def test_query_with_many_bind_params
assert_equal [[nil, 1]], @db.query("select ?, ?", nil, 1).to_a
end

def test_query_with_nil_bind_params
assert_equal [['foo']], @db.query("select 'foo'", nil).to_a
end

def test_execute_with_many_bind_params
assert_equal [[nil, 1]], @db.execute("select ?, ?", nil, 1)
end

def test_execute_with_nil_bind_params
assert_equal [['foo']], @db.execute("select 'foo'", nil)
end
end
end

0 comments on commit 97445a1

Please sign in to comment.