diff --git a/spec/acts_as_taggable_on/caching_spec.rb b/spec/acts_as_taggable_on/caching_spec.rb index 39565ccfb..a9f762c4a 100644 --- a/spec/acts_as_taggable_on/caching_spec.rb +++ b/spec/acts_as_taggable_on/caching_spec.rb @@ -101,13 +101,8 @@ describe 'Cache methods initialization on new models' do before(:all) do - ActiveRecord::Schema.define do - create_table :cache_methods_injected_models do |t| - t.string :cached_tag_list - end - end ActiveRecord::Base.connection.execute( - 'INSERT INTO cache_methods_injected_models VALUES (NULL, \'ciao\')' + 'INSERT INTO cache_methods_injected_models (cached_tag_list) VALUES (\'ciao\')' ) class CacheMethodsInjectedModel < ActiveRecord::Base acts_as_taggable diff --git a/spec/internal/db/schema.rb b/spec/internal/db/schema.rb index d72f881cb..af9ba2ab4 100644 --- a/spec/internal/db/schema.rb +++ b/spec/internal/db/schema.rb @@ -78,6 +78,9 @@ t.column :type, :string end + create_table :cache_methods_injected_models, force: true do |t| + t.column :cached_tag_list, :string + end # Special cases for postgresql if using_postgresql?