@@ -778,6 +778,7 @@ module ConnectionAdapters
778778module ActiveRecord
779779 # The original module is hardcoded for PostgreSQL/SQLite/MySQL tests.
780780 module DatabaseTasksSetupper
781+ undef_method :setup
781782 def setup
782783 @sqlserver_tasks =
783784 Class . new do
@@ -800,6 +801,7 @@ def structure_load(*); end
800801 $stderr, @original_stderr = StringIO . new , $stderr
801802 end
802803
804+ undef_method :with_stubbed_new
803805 def with_stubbed_new
804806 ActiveRecord ::Tasks ::SQLServerDatabaseTasks . stub ( :new , @sqlserver_tasks ) do
805807 yield
@@ -1953,8 +1955,9 @@ def with_marshable_time_defaults
19531955 end
19541956
19551957 # We need to give the full path for this to work.
1958+ undef_method :schema_dump_path
19561959 def schema_dump_path
1957- File . join ARTest ::SQLServer . root_activerecord , "test/assets/schema_dump_5_1.yml"
1960+ File . join ( ARTest ::SQLServer . root_activerecord , "test/assets/schema_dump_5_1.yml" )
19581961 end
19591962 end
19601963 end
@@ -2306,6 +2309,7 @@ class ReloadModelsTest < ActiveRecord::TestCase
23062309class MarshalSerializationTest < ActiveRecord ::TestCase
23072310 private
23082311
2312+ undef_method :marshal_fixture_path
23092313 def marshal_fixture_path ( file_name )
23102314 File . expand_path (
23112315 "support/marshal_compatibility_fixtures/#{ ActiveRecord ::Base . connection . adapter_name } /#{ file_name } .dump" ,
@@ -2561,6 +2565,7 @@ module ActiveRecord
25612565 class Migration
25622566 class InvalidOptionsTest < ActiveRecord ::TestCase
25632567 # Include the additional SQL Server migration options.
2568+ undef_method :invalid_add_column_option_exception_message
25642569 def invalid_add_column_option_exception_message ( key )
25652570 default_keys = [ ":limit" , ":precision" , ":scale" , ":default" , ":null" , ":collation" , ":comment" , ":primary_key" , ":if_exists" , ":if_not_exists" ]
25662571 default_keys . concat ( [ ":is_identity" ] ) # SQL Server additional valid keys
@@ -2573,6 +2578,7 @@ def invalid_add_column_option_exception_message(key)
25732578
25742579# SQL Server does not support upsert. Removed dependency on `insert_all` that uses upsert.
25752580class ActiveRecord ::Encryption ::ConcurrencyTest < ActiveRecord ::EncryptionTestCase
2581+ undef_method :thread_encrypting_and_decrypting
25762582 def thread_encrypting_and_decrypting ( thread_label )
25772583 posts = 100 . times . collect { |index | EncryptedPost . create! title : "Article #{ index } (#{ thread_label } )" , body : "Body #{ index } (#{ thread_label } )" }
25782584
@@ -2590,6 +2596,7 @@ def thread_encrypting_and_decrypting(thread_label)
25902596# can read and write `ActiveRecord::ConnectionAdapters::SQLServer::Type::Data` objects.
25912597class ActiveRecordMessagePackTest < ActiveRecord ::TestCase
25922598 private
2599+ undef_method :serializer
25932600 def serializer
25942601 @serializer ||= ::MessagePack ::Factory . new . tap do |factory |
25952602 ActiveRecord ::MessagePack ::Extensions . install ( factory )
0 commit comments