mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
register spec subclasses for people who spec
This commit is contained in:
parent
b15d2c0708
commit
1c09c29a09
2 changed files with 13 additions and 1 deletions
|
@ -326,6 +326,12 @@ module ActionController
|
|||
#
|
||||
# assert_redirected_to page_url(:title => 'foo')
|
||||
class TestCase < ActiveSupport::TestCase
|
||||
|
||||
# Use AS::TestCase for the base class when describing a model
|
||||
register_spec_type(self) do |desc|
|
||||
desc < ActionController::Base
|
||||
end
|
||||
|
||||
module Behavior
|
||||
extend ActiveSupport::Concern
|
||||
include ActionDispatch::TestProcess
|
||||
|
|
|
@ -9,7 +9,13 @@ require 'active_support/testing/mochaing'
|
|||
require 'active_support/core_ext/kernel/reporting'
|
||||
|
||||
module ActiveSupport
|
||||
class TestCase < ::MiniTest::Unit::TestCase
|
||||
class TestCase < ::MiniTest::Spec
|
||||
|
||||
# Use AS::TestCase for the base class when describing a model
|
||||
register_spec_type(self) do |desc|
|
||||
desc < ActiveRecord::Model
|
||||
end
|
||||
|
||||
Assertion = MiniTest::Assertion
|
||||
alias_method :method_name, :name if method_defined? :name
|
||||
alias_method :method_name, :__name__ if method_defined? :__name__
|
||||
|
|
Loading…
Reference in a new issue