Sha256: 7f722ae748cbddb12ffd4839b3bdca773d425cf8e90c24c4ba2028321b833ab9

Contents?: true

Size: 723 Bytes

Versions: 12

Compression:

Stored size: 723 Bytes

Contents

require 'jdbc_common'
require 'db/oracle'

class OracleSimpleTest < Test::Unit::TestCase
  include SimpleTestMethods
end

class OracleSpecificTest < Test::Unit::TestCase
  include MultibyteTestMethods

  def setup
    super
    @java_con.createStatement.execute "CREATE TABLE DEFAULT_NUMBER (VALUE NUMBER)"
    @java_con.createStatement.execute "INSERT INTO DEFAULT_NUMBER (VALUE) VALUES (0.076)"
  end

  def teardown
    @java_con.createStatement.execute "DROP TABLE DEFAULT_NUMBER"
    super
  end


  def test_default_number_precision
    klass = Class.new(ActiveRecord::Base)
    klass.set_table_name "DEFAULT_NUMBER"
    obj = klass.find(:first)
    assert_equal 0.076, obj.value
  end
end if defined?(JRUBY_VERSION)

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
saturnflyer-activerecord-jdbc-adapter-0.9.3 test/oracle_simple_test.rb
activerecord-jdbc-adapter-0.9.5-java test/oracle_simple_test.rb
activerecord-jdbc-adapter-0.9.4-java test/oracle_simple_test.rb
activerecord-jdbc-adapter-0.9.3-java test/oracle_simple_test.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.6 test/oracle_simple_test.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.5 test/oracle_simple_test.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.4 test/oracle_simple_test.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.3 test/oracle_simple_test.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.2 test/oracle_simple_test.rb
jpzwarte-activerecord-jdbc-adapter-0.9.2.1 test/oracle_simple_test.rb
activerecord-jdbc-adapter-0.9.2 test/oracle_simple_test.rb
activerecord-jdbc-adapter-0.9.1 test/oracle_simple_test.rb