Skip to content

Commit eb4930e

Browse files
committed
Inherit from MiniTest::Unit::TestCase instead of MiniTest::Spec
1 parent d58d71f commit eb4930e

File tree

6 files changed

+3
-29
lines changed

6 files changed

+3
-29
lines changed

actionmailer/lib/action_mailer/test_case.rb

-7
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ def initialize(name)
1010
end
1111

1212
class TestCase < ActiveSupport::TestCase
13-
14-
# Use AM::TestCase for the base class when describing a mailer
15-
register_spec_type(self) do |desc|
16-
Class === desc && desc < ActionMailer::Base
17-
end
18-
register_spec_type(/Mailer( ?Test)?\z/i, self)
19-
2013
module Behavior
2114
extend ActiveSupport::Concern
2215

actionpack/lib/action_controller/test_case.rb

-7
Original file line numberDiff line numberDiff line change
@@ -360,13 +360,6 @@ def exists?
360360
#
361361
# assert_redirected_to page_url(title: 'foo')
362362
class TestCase < ActiveSupport::TestCase
363-
364-
# Use AC::TestCase for the base class when describing a controller
365-
register_spec_type(self) do |desc|
366-
Class === desc && desc < ActionController::Metal
367-
end
368-
register_spec_type(/Controller( ?Test)?\z/i, self)
369-
370363
module Behavior
371364
extend ActiveSupport::Concern
372365
include ActionDispatch::TestProcess

actionpack/lib/action_dispatch/testing/integration.rb

-3
Original file line numberDiff line numberDiff line change
@@ -491,9 +491,6 @@ class IntegrationTest < ActiveSupport::TestCase
491491
include ActionController::TemplateAssertions
492492
include ActionDispatch::Routing::UrlFor
493493

494-
# Use AD::IntegrationTest for acceptance tests
495-
register_spec_type(/(Acceptance|Integration) ?Test\z/i, self)
496-
497494
@@app = nil
498495

499496
def self.app

actionpack/lib/action_view/test_case.rb

-3
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ def initialize
3030
end
3131
end
3232

33-
# Use AV::TestCase for the base class for helpers and views
34-
register_spec_type(/(Helper|View)( ?Test)?\z/i, self)
35-
3633
module Behavior
3734
extend ActiveSupport::Concern
3835

activesupport/lib/active_support/test_case.rb

+2-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
gem 'minitest' # make sure we get the gem, not stdlib
2-
require 'minitest/spec'
2+
require 'minitest/unit'
33
require 'active_support/testing/tagged_logging'
44
require 'active_support/testing/setup_and_teardown'
55
require 'active_support/testing/assertions'
@@ -17,13 +17,7 @@
1717
end
1818

1919
module ActiveSupport
20-
class TestCase < ::MiniTest::Spec
21-
22-
# Use AS::TestCase for the base class when describing a model
23-
register_spec_type(self) do |desc|
24-
Class === desc && desc < ActiveRecord::Base
25-
end
26-
20+
class TestCase < ::MiniTest::Unit::TestCase
2721
Assertion = MiniTest::Assertion
2822
alias_method :method_name, :__name__
2923

railties/test/engine_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require 'abstract_unit'
22

33
class EngineTest < ActiveSupport::TestCase
4-
it "reports routes as available only if they're actually present" do
4+
test "reports routes as available only if they're actually present" do
55
engine = Class.new(Rails::Engine) do
66
def initialize(*args)
77
@routes = nil

0 commit comments

Comments
 (0)