mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
TestCase does not need to be loaded when loading the framework
This commit is contained in:
parent
65df7b376a
commit
8b35a239fb
2 changed files with 13 additions and 2 deletions
|
@ -36,7 +36,7 @@ module ActionView
|
||||||
autoload :LookupContext
|
autoload :LookupContext
|
||||||
autoload :PathSet
|
autoload :PathSet
|
||||||
autoload :Template
|
autoload :Template
|
||||||
autoload :TestCase
|
|
||||||
|
|
||||||
autoload_under "renderer" do
|
autoload_under "renderer" do
|
||||||
autoload :Renderer
|
autoload :Renderer
|
||||||
|
@ -73,6 +73,8 @@ module ActionView
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
autoload :TestCase
|
||||||
|
|
||||||
ENCODING_FLAG = '#.*coding[:=]\s*(\S+)[ \t]*'
|
ENCODING_FLAG = '#.*coding[:=]\s*(\S+)[ \t]*'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -148,6 +148,15 @@ module ApplicationTests
|
||||||
assert AppTemplate::Application.config.allow_concurrency
|
assert AppTemplate::Application.config.allow_concurrency
|
||||||
end
|
end
|
||||||
|
|
||||||
|
test "initialize a threadsafe app" do
|
||||||
|
add_to_config <<-RUBY
|
||||||
|
config.threadsafe!
|
||||||
|
RUBY
|
||||||
|
|
||||||
|
require "#{app_path}/config/application"
|
||||||
|
assert AppTemplate::Application.initialize!
|
||||||
|
end
|
||||||
|
|
||||||
test "asset_path defaults to nil for application" do
|
test "asset_path defaults to nil for application" do
|
||||||
require "#{app_path}/config/environment"
|
require "#{app_path}/config/environment"
|
||||||
assert_equal nil, AppTemplate::Application.config.asset_path
|
assert_equal nil, AppTemplate::Application.config.asset_path
|
||||||
|
@ -179,7 +188,7 @@ module ApplicationTests
|
||||||
|
|
||||||
require "#{app_path}/config/environment"
|
require "#{app_path}/config/environment"
|
||||||
|
|
||||||
assert !ActionController.autoload?(:Caching)
|
assert !ActionView.autoload?(:AssetPaths)
|
||||||
end
|
end
|
||||||
|
|
||||||
test "filter_parameters should be able to set via config.filter_parameters" do
|
test "filter_parameters should be able to set via config.filter_parameters" do
|
||||||
|
|
Loading…
Reference in a new issue