aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/arel/helper.rb
diff options
context:
space:
mode:
authorYasuo Honda <yasuo.honda@gmail.com>2018-04-25 10:29:58 +0000
committerYasuo Honda <yasuo.honda@gmail.com>2018-05-01 13:09:12 +0000
commit32562407886c8536187101d69a6c73e95ebcd25f (patch)
treea7d8459ea10bf5e13ee39baa143a7e668eefd530 /activerecord/test/cases/arel/helper.rb
parenta42fb70a152ee05725685a8f68e3e8e2ddda4b36 (diff)
downloadrails-32562407886c8536187101d69a6c73e95ebcd25f.tar.gz
rails-32562407886c8536187101d69a6c73e95ebcd25f.tar.bz2
rails-32562407886c8536187101d69a6c73e95ebcd25f.zip
Make `Arel::Test` subclass of `ActiveSupport::TestCase`
not `Minitest::Test` to address `CustomCops/RefuteNot` and `CustomCops/AssertNot` offenses for Arel test cases Also including `ActiveSupport::Testing::Assertions` to `Arel::Spec` and add test/unit backwards compatibility methods Fixes #32720
Diffstat (limited to 'activerecord/test/cases/arel/helper.rb')
-rw-r--r--activerecord/test/cases/arel/helper.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/test/cases/arel/helper.rb b/activerecord/test/cases/arel/helper.rb
index 1f8612f799..15cfd44e87 100644
--- a/activerecord/test/cases/arel/helper.rb
+++ b/activerecord/test/cases/arel/helper.rb
@@ -1,5 +1,6 @@
# frozen_string_literal: true
+require "active_support/test_case"
require "rubygems"
require "minitest/autorun"
require "arel"
@@ -13,7 +14,7 @@ class Object
end
module Arel
- class Test < Minitest::Test
+ class Test < ActiveSupport::TestCase
def setup
super
@arel_engine = Arel::Table.engine
@@ -40,5 +41,11 @@ module Arel
after do
Arel::Table.engine = @arel_engine if defined? @arel_engine
end
+ include ActiveSupport::Testing::Assertions
+
+ # test/unit backwards compatibility methods
+ alias :assert_no_match :refute_match
+ alias :assert_not_equal :refute_equal
+ alias :assert_not_same :refute_same
end
end