test/db/mssql/unit_test.rb
def new_adapter_stub(config = {})
    config = config.merge({
        :adapter => 'jdbc',
        :adapter_spec => ArJdbc::MSSQL,
        :sqlserver_version => 2008
    })
    connection = stub('connection'); logger = nil
    connection.stub_everything
    adapter = ActiveRecord::ConnectionAdapters::JdbcAdapter.new connection, logger, config
    yield(adapter) if block_given?
    adapter
  end
# NOTE: lot of tests kindly borrowed from __activerecord-sqlserver-adapter__
lot of tests kindly borrowed from __activerecord-sqlserver-adapter
lot of tests kindly borrowed from __activerecord - sqlserver - adapter
def new_adapter_stub(config = {})
    config = config.merge({
        :adapter => 'jdbc',
        :adapter_spec => ArJdbc::MSSQL,
        :sqlserver_version => 2008
    })
    connection = stub('connection'); logger = nil
    connection.stub_everything
    adapter = ActiveRecord::ConnectionAdapters::JdbcAdapter.new connection, logger, config
    yield(adapter) if block_given?
    adapter
  end
def new_adapter_stub ( config = { } ) config = config . merge ( { :adapter => 'jdbc' , :adapter_spec => ArJdbc :: MSSQL , :sqlserver_version => 2008 } ) connection = stub ( 'connection' ) ; logger = nil connection . stub_everything adapter = ActiveRecord :: ConnectionAdapters :: JdbcAdapter . new connection , logger , config yield ( adapter ) if block_given? adapter end
NOTE: lot of tests kindly borrowed from __activerecord-sqlserver-adapter__
NOTE : lot of tests kindly borrowed from __activerecord - sqlserver - adapter__
config