diff --git a/test/cases/helper_cockroachdb.rb b/test/cases/helper_cockroachdb.rb index 4bc51873..523658b8 100644 --- a/test/cases/helper_cockroachdb.rb +++ b/test/cases/helper_cockroachdb.rb @@ -17,12 +17,23 @@ # and COCKROACH_SKIP_LOAD_SCHEMA that can # skip this step require "support/load_schema_helper" +class NoPGSchemaTestCase < SimpleDelegator + def current_adapter?(...) + puts ?ยป * 80 + false + end +end + module LoadSchemaHelperExt def load_schema + old_helper = ActiveRecord::TestCase + ActiveRecord.const_set(:TestCase, NoPGSchemaTestCase.new(ActiveRecord::TestCase)) return if ENV['COCKROACH_LOAD_FROM_TEMPLATE'] return if ENV['COCKROACH_SKIP_LOAD_SCHEMA'] super + ensure + ActiveRecord.const_set(:TestCase, old_helper) end end LoadSchemaHelper.prepend(LoadSchemaHelperExt)