mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Raise a helpful error if config.frameworks is used
This commit is contained in:
@@ -119,6 +119,13 @@ module Rails
|
||||
end
|
||||
end
|
||||
|
||||
def frameworks(*args)
|
||||
raise "config.frameworks in no longer supported. See the generated" \
|
||||
"config/boot.rb for steps on how to limit the frameworks that" \
|
||||
"will be loaded"
|
||||
end
|
||||
alias frameworks= frameworks
|
||||
|
||||
# Enable threaded mode. Allows concurrent requests to controller actions and
|
||||
# multiple database connections. Also disables automatic dependency loading
|
||||
# after boot, and disables reloading code on every request, as these are
|
||||
|
||||
@@ -100,5 +100,21 @@ module ApplicationTests
|
||||
|
||||
assert !ActionController.autoload?(:RecordIdentifier)
|
||||
end
|
||||
|
||||
test "runtime error is raised if config.frameworks= is used" do
|
||||
add_to_config "config.frameworks = []"
|
||||
|
||||
assert_raises RuntimeError do
|
||||
require "#{app_path}/config/environment"
|
||||
end
|
||||
end
|
||||
|
||||
test "runtime error is raised if config.frameworks is used" do
|
||||
add_to_config "config.frameworks -= []"
|
||||
|
||||
assert_raises RuntimeError do
|
||||
require "#{app_path}/config/environment"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user