Fix test suite for ActiveRecord 3.x; assume primary key is INT if 'versions' table doesn't exist yet
This commit is contained in:
parent
4dba95a082
commit
8ae62c8b8e
|
@ -18,6 +18,9 @@ group :development, :test do
|
|||
gem 'rspec-rails', '~> 2.14'
|
||||
gem 'generator_spec'
|
||||
|
||||
# To do proper transactional testing with ActiveSupport::TestCase on MySQL
|
||||
gem 'database_cleaner', '~> 1.2'
|
||||
|
||||
platforms :ruby do
|
||||
gem 'sqlite3', '~> 1.2'
|
||||
gem 'mysql2', '~> 0.3'
|
||||
|
|
|
@ -70,6 +70,8 @@ module PaperTrail
|
|||
|
||||
def primary_key_is_int?
|
||||
@primary_key_is_int ||= columns_hash[primary_key].type == :integer
|
||||
rescue
|
||||
true
|
||||
end
|
||||
|
||||
# Returns whether the `object` column is using the `json` type supported by PostgreSQL
|
||||
|
|
Loading…
Reference in New Issue