1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Inherit from MiniTest::Unit::TestCase instead of MiniTest::Spec

This commit is contained in:
Rafael Mendonça França 2012-12-28 14:16:26 -03:00
parent d58d71f565
commit eb4930e3c7
6 changed files with 3 additions and 29 deletions

View file

@ -10,13 +10,6 @@ module ActionMailer
end
class TestCase < ActiveSupport::TestCase
# Use AM::TestCase for the base class when describing a mailer
register_spec_type(self) do |desc|
Class === desc && desc < ActionMailer::Base
end
register_spec_type(/Mailer( ?Test)?\z/i, self)
module Behavior
extend ActiveSupport::Concern

View file

@ -360,13 +360,6 @@ module ActionController
#
# assert_redirected_to page_url(title: 'foo')
class TestCase < ActiveSupport::TestCase
# Use AC::TestCase for the base class when describing a controller
register_spec_type(self) do |desc|
Class === desc && desc < ActionController::Metal
end
register_spec_type(/Controller( ?Test)?\z/i, self)
module Behavior
extend ActiveSupport::Concern
include ActionDispatch::TestProcess

View file

@ -491,9 +491,6 @@ module ActionDispatch
include ActionController::TemplateAssertions
include ActionDispatch::Routing::UrlFor
# Use AD::IntegrationTest for acceptance tests
register_spec_type(/(Acceptance|Integration) ?Test\z/i, self)
@@app = nil
def self.app

View file

@ -30,9 +30,6 @@ module ActionView
end
end
# Use AV::TestCase for the base class for helpers and views
register_spec_type(/(Helper|View)( ?Test)?\z/i, self)
module Behavior
extend ActiveSupport::Concern

View file

@ -1,5 +1,5 @@
gem 'minitest' # make sure we get the gem, not stdlib
require 'minitest/spec'
require 'minitest/unit'
require 'active_support/testing/tagged_logging'
require 'active_support/testing/setup_and_teardown'
require 'active_support/testing/assertions'
@ -17,13 +17,7 @@ rescue LoadError
end
module ActiveSupport
class TestCase < ::MiniTest::Spec
# Use AS::TestCase for the base class when describing a model
register_spec_type(self) do |desc|
Class === desc && desc < ActiveRecord::Base
end
class TestCase < ::MiniTest::Unit::TestCase
Assertion = MiniTest::Assertion
alias_method :method_name, :__name__

View file

@ -1,7 +1,7 @@
require 'abstract_unit'
class EngineTest < ActiveSupport::TestCase
it "reports routes as available only if they're actually present" do
test "reports routes as available only if they're actually present" do
engine = Class.new(Rails::Engine) do
def initialize(*args)
@routes = nil