Sha256: adcb590d78c033d5315f6cf95fe41a364099f54d9a087e13a19930936fe1098a

Contents?: true

Size: 868 Bytes

Versions: 30

Compression:

Stored size: 868 Bytes

Contents

require 'helper'

module SQLite3
  class TestDeprecated < Test::Unit::TestCase
    def setup
      super
      @warn_before = $-w
      $-w = false
      @db = SQLite3::Database.new(':memory:')
    end

    def teardown
      super
      $-w = @warn_before
    end

    def test_execute_with_many_bind_params_not_nil
      assert_equal [[1, 2]], @db.execute("select ?, ?", 1, 2).to_a
    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

Version data entries

30 entries across 30 versions & 4 rubygems

Version Path
challah-0.6.2 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.6.1 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.6.0 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.5.4 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.5.3 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.5.2 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.5.1 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
radiant-1.0.0 ruby-debug/ruby/1.8/gems/sqlite3-1.3.4/test/test_deprecated.rb
challah-0.5.0 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.4.1 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.4.0 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.3.5 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.3.4 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.3.3 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.3.2 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.3.1 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.3.0 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.2.1 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
challah-0.2.0 vendor/bundle/gems/sqlite3-1.3.5/test/test_deprecated.rb
sqlite3-1.3.5-x86-mswin32-60 test/test_deprecated.rb