Permalink
Browse files

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
  • Loading branch information...
1 parent 56edecb commit 7c5e0035fa0b25ee5481ea81bc353ff18dd2d109 @ranjaykrishna ranjaykrishna committed Mar 27, 2013
@@ -101,6 +101,10 @@ def initialize(connection, logger = nil, pool = nil) #:nodoc:
@visitor = nil
end
+ def valid_type?(type)
+ true
+ end
+
class SchemaCreation
def initialize(conn)
@conn = conn
@@ -499,10 +499,6 @@ def rename_column(table_name, column_name, new_column_name) #:nodoc:
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)
@@ -30,6 +30,10 @@ def test_valid_column
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

0 comments on commit 7c5e003

Please sign in to comment.