1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

added comments to test_invalid_type in sqlite3 adapter test and added valid_type? method to abstract_adapter.rb and removed unnecessary method from sqlite3 adapter

This commit is contained in:
Ranjay Krishna 2013-03-27 00:52:26 -04:00
parent 56edecbf24
commit 7c5e0035fa
3 changed files with 8 additions and 4 deletions

View file

@ -101,6 +101,10 @@ module ActiveRecord
@visitor = nil
end
def valid_type?(type)
true
end
class SchemaCreation
def initialize(conn)
@conn = conn

View file

@ -499,10 +499,6 @@ module ActiveRecord
rename_column_indexes(table_name, column_name, new_column_name)
end
def valid_type?(type)
true
end
protected
def select(sql, name = nil, binds = []) #:nodoc:
exec_query(sql, name, binds)

View file

@ -30,6 +30,10 @@ module ActiveRecord
assert @conn.valid_type?(column.type)
end
# sqlite databses should be able to support any type and not
# just the ones mentioned in the native_database_types.
# Therefore test_invalid column should always return true
# even if the type is not valid.
def test_invalid_column
assert @conn.valid_type?(:foobar)
end