mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
fix rake test_sqlite3_mem
.
While running Sqlite3 memory tests I encountered the following error: ``` Finished in 69.416366s, 58.0267 runs/s, 162.3681 assertions/s. 1) Error: ActiveRecord::Migration::ChangeSchemaTest#test_add_column_with_timestamp_type: NoMethodError: undefined method `type' for nil:NilClass /Users/senny/Projects/rails/activerecord/test/cases/migration/change_schema_test.rb:244:in `test_add_column_with_timestamp_type' 4028 runs, 11271 assertions, 0 failures, 1 errors, 1 skips ``` This was because the table `testings` was used in multiple test-cases. This resulted in a wrongly cached schema on `ActiveRecord::Base.schema_chae`. /cc @zuhao
This commit is contained in:
parent
60bd2432b2
commit
8f8dfa488a
1 changed files with 1 additions and 0 deletions
|
@ -14,6 +14,7 @@ module ActiveRecord
|
||||||
teardown do
|
teardown do
|
||||||
connection.drop_table :testings rescue nil
|
connection.drop_table :testings rescue nil
|
||||||
ActiveRecord::Base.primary_key_prefix_type = nil
|
ActiveRecord::Base.primary_key_prefix_type = nil
|
||||||
|
ActiveRecord::Base.clear_cache!
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_create_table_without_id
|
def test_create_table_without_id
|
||||||
|
|
Loading…
Reference in a new issue