Title: [1024] trunk/activerecord-jdbc/test/jdbc_adapter/jdbc_sybase_test.rb: Forgot to add the test to the last checkin
Revision
1024
Author
kofno
Date
2008-06-10 00:11:25 -0400 (Tue, 10 Jun 2008)

Log Message

Forgot to add the test to the last checkin

Added Paths


Diff

Added: trunk/activerecord-jdbc/test/jdbc_adapter/jdbc_sybase_test.rb (0 => 1024)


--- trunk/activerecord-jdbc/test/jdbc_adapter/jdbc_sybase_test.rb	                        (rev 0)
+++ trunk/activerecord-jdbc/test/jdbc_adapter/jdbc_sybase_test.rb	2008-06-10 04:11:25 UTC (rev 1024)
@@ -0,0 +1,33 @@
+require 'jdbc_common'
+require 'jdbc_adapter'
+
+class MockConnection 
+  
+  def adapter=( adapt )
+  end
+
+end
+
+module ActiveRecord
+  module ConnectionAdapters
+
+    class SybaseAdapterSelectionTest < Test::Unit::TestCase
+      
+      def testJtdsSelectionUsingDialect()
+        config = {
+          :driver =>  'net.sourceforge.jtds.Driver',
+          :dialect => 'sybase'
+        }
+        adapt = JdbcAdapter.new(MockConnection.new, nil, config)
+        assert adapt.kind_of?(JdbcSpec::Sybase), "Should be a sybase adapter"
+      end
+      
+      def testJtdsSelectionNotUsingDialect
+        config = { :driver => 'net.sourceforge.jtds.Driver' }
+        adapt = JdbcAdapter.new(MockConnection.new, nil, config)
+        assert adapt.kind_of?(JdbcSpec::MsSQL), "Should be a MsSQL apdater"
+      end
+      
+    end
+  end
+end
_______________________________________________
Jruby-extras-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/jruby-extras-devel

Reply via email to