Sha256: b44ce6c0856bc7062cc4855bfa1bd8a123f31a007233de68ae71035c4dabe165

Contents?: true

Size: 696 Bytes

Versions: 4

Compression:

Stored size: 696 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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activerecord-jdbc-adapter-0.9.0.1 test/oracle_simple_test.rb
activerecord-jdbc-adapter-0.8.2 test/oracle_simple_test.rb
activerecord-jdbc-adapter-0.9 test/oracle_simple_test.rb
activerecord-jdbc-adapter-0.8.1 test/oracle_simple_test.rb