提交 a5ab38c7 编写于 作者: A Aaron Patterson

remove deprecated code. Rely on `describe` provided by minitest

上级 80b4fe2c
module ActiveSupport
module Testing
module Declarative
def self.extended(klass) #:nodoc:
klass.class_eval do
unless method_defined?(:describe)
def self.describe(text)
if block_given?
super
else
message = "`describe` without a block is deprecated, please switch to: `def self.name; #{text.inspect}; end`\n"
ActiveSupport::Deprecation.warn message
class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
def self.name
"#{text}"
end
RUBY_EVAL
end
end
end
end
end
unless defined?(Spec)
# Helper to define a test method using a String. Under the hood, it replaces
# spaces with underscores and defines the test method.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册