提交 d342a35e 编写于 作者: Y yuuji.yaginuma

Remove needless setup from `InfoTest`

The `abstract_unit` loads `rails/all`. Therefore, `Rails` is definitely defined.
Also, since `Info` is autoloaded, do not need to explicitly load the file.
https://github.com/rails/rails/blob/3ede539357acc91e377611cea9dd5f30678e7b2a/railties/lib/rails.rb#L29
上级 8c9a9309
......@@ -2,20 +2,7 @@
require "abstract_unit"
unless defined?(Rails) && defined?(Rails::Info)
module Rails
class Info; end
end
end
require "active_support/core_ext/kernel/reporting"
class InfoTest < ActiveSupport::TestCase
def setup
Rails.send :remove_const, :Info
silence_warnings { load "rails/info.rb" }
end
def test_property_with_block_swallows_exceptions_and_ignores_property
assert_nothing_raised do
Rails::Info.module_eval do
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册