Skip to content
Browse files

Require active_support/all unless specifically requested to be left out.

  • Loading branch information...
1 parent 9653599 commit af5c3c852e43fc95b4c4344f61c9c8fc2210b0ca Carlhuda committed Dec 23, 2009
Showing with 10 additions and 0 deletions.
  1. +4 −0 railties/lib/rails/application.rb
  2. +6 −0 railties/test/application/configuration_test.rb
View
4 railties/lib/rails/application.rb
@@ -132,6 +132,10 @@ def call(env)
@app.call(env)
end
+ initializer :load_all_active_support do
+ require "active_support/all" unless config.active_support.bare
+ end
+
# Set the <tt>$LOAD_PATH</tt> based on the value of
# Configuration#load_paths. Duplicates are removed.
initializer :set_load_path do
View
6 railties/test/application/configuration_test.rb
@@ -46,6 +46,12 @@ def setup
end
end
+ test "if there's no config.active_support.bare, all of ActiveSupport is required" do
+ use_frameworks []
+ require "#{app_path}/config/environment"
+ assert_nothing_raised { [1,2,3].rand }
+ end
+
test "config.active_support.bare does not require all of ActiveSupport" do
add_to_config "config.active_support.bare = true"

0 comments on commit af5c3c8

Please sign in to comment.
Something went wrong with that request. Please try again.