@@ -778,6 +778,7 @@ module ConnectionAdapters
778
778
module ActiveRecord
779
779
# The original module is hardcoded for PostgreSQL/SQLite/MySQL tests.
780
780
module DatabaseTasksSetupper
781
+ undef_method :setup
781
782
def setup
782
783
@sqlserver_tasks =
783
784
Class . new do
@@ -800,6 +801,7 @@ def structure_load(*); end
800
801
$stderr, @original_stderr = StringIO . new , $stderr
801
802
end
802
803
804
+ undef_method :with_stubbed_new
803
805
def with_stubbed_new
804
806
ActiveRecord ::Tasks ::SQLServerDatabaseTasks . stub ( :new , @sqlserver_tasks ) do
805
807
yield
@@ -1953,8 +1955,9 @@ def with_marshable_time_defaults
1953
1955
end
1954
1956
1955
1957
# We need to give the full path for this to work.
1958
+ undef_method :schema_dump_path
1956
1959
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" )
1958
1961
end
1959
1962
end
1960
1963
end
@@ -2306,6 +2309,7 @@ class ReloadModelsTest < ActiveRecord::TestCase
2306
2309
class MarshalSerializationTest < ActiveRecord ::TestCase
2307
2310
private
2308
2311
2312
+ undef_method :marshal_fixture_path
2309
2313
def marshal_fixture_path ( file_name )
2310
2314
File . expand_path (
2311
2315
"support/marshal_compatibility_fixtures/#{ ActiveRecord ::Base . connection . adapter_name } /#{ file_name } .dump" ,
@@ -2561,6 +2565,7 @@ module ActiveRecord
2561
2565
class Migration
2562
2566
class InvalidOptionsTest < ActiveRecord ::TestCase
2563
2567
# Include the additional SQL Server migration options.
2568
+ undef_method :invalid_add_column_option_exception_message
2564
2569
def invalid_add_column_option_exception_message ( key )
2565
2570
default_keys = [ ":limit" , ":precision" , ":scale" , ":default" , ":null" , ":collation" , ":comment" , ":primary_key" , ":if_exists" , ":if_not_exists" ]
2566
2571
default_keys . concat ( [ ":is_identity" ] ) # SQL Server additional valid keys
@@ -2573,6 +2578,7 @@ def invalid_add_column_option_exception_message(key)
2573
2578
2574
2579
# SQL Server does not support upsert. Removed dependency on `insert_all` that uses upsert.
2575
2580
class ActiveRecord ::Encryption ::ConcurrencyTest < ActiveRecord ::EncryptionTestCase
2581
+ undef_method :thread_encrypting_and_decrypting
2576
2582
def thread_encrypting_and_decrypting ( thread_label )
2577
2583
posts = 100 . times . collect { |index | EncryptedPost . create! title : "Article #{ index } (#{ thread_label } )" , body : "Body #{ index } (#{ thread_label } )" }
2578
2584
@@ -2590,6 +2596,7 @@ def thread_encrypting_and_decrypting(thread_label)
2590
2596
# can read and write `ActiveRecord::ConnectionAdapters::SQLServer::Type::Data` objects.
2591
2597
class ActiveRecordMessagePackTest < ActiveRecord ::TestCase
2592
2598
private
2599
+ undef_method :serializer
2593
2600
def serializer
2594
2601
@serializer ||= ::MessagePack ::Factory . new . tap do |factory |
2595
2602
ActiveRecord ::MessagePack ::Extensions . install ( factory )
0 commit comments