Raise a helpful error if config.frameworks is used

This commit is contained in:
Carl Lerche
2009-12-31 11:57:48 -08:00
parent a23f4b6aee
commit 2f8643955a
2 changed files with 23 additions and 0 deletions

View File

@@ -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

View File

@@ -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