Sha256: 70879ca29b2f10df8ad90e786cd6a3358be82529b064effd8644494eaef39161

Contents?: true

Size: 509 Bytes

Versions: 5

Compression:

Stored size: 509 Bytes

Contents

require 'abstract_unit'
require 'fixtures/default'

class DefaultsTest < Test::Unit::TestCase
  if %w(PostgreSQL).include? ActiveRecord::Base.connection.adapter_name
    def test_default_integers
      default = Default.new
      assert_instance_of(Fixnum, default.positive_integer)
      assert_equal(default.positive_integer, 1)
      assert_instance_of(Fixnum, default.negative_integer)
      assert_equal(default.negative_integer, -1)
    end
  else
    def test_dummy
      assert true
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
activerecord-1.14.0 test/defaults_test.rb
activerecord-1.14.3 test/defaults_test.rb
activerecord-1.14.1 test/defaults_test.rb
activerecord-1.14.2 test/defaults_test.rb
activerecord-1.14.4 test/defaults_test.rb