aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-06-02 08:45:03 +0200
committerMikel Lindsaar <raasdnil@gmail.com>2010-06-03 23:32:12 +1000
commit44cb6dce62a75b259a9e00aed1ff0aa1eb369c9b (patch)
treef756a6401ba88013e3726f19dcb0f43ab91ba0b3 /railties/test/generators
parenta73d6e7913bdc2d4de8c63b7cc4095f0241d761e (diff)
downloadrails-44cb6dce62a75b259a9e00aed1ff0aa1eb369c9b.tar.gz
rails-44cb6dce62a75b259a9e00aed1ff0aa1eb369c9b.tar.bz2
rails-44cb6dce62a75b259a9e00aed1ff0aa1eb369c9b.zip
Still copy application configuration to generator even if they are required earlier. Also tidy up the guide a little bit.
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/generators_test_helper.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/railties/test/generators/generators_test_helper.rb b/railties/test/generators/generators_test_helper.rb
index d8bdb344f2..4a5a9b2932 100644
--- a/railties/test/generators/generators_test_helper.rb
+++ b/railties/test/generators/generators_test_helper.rb
@@ -1,4 +1,6 @@
require 'abstract_unit'
+require 'rails/generators'
+require 'rails/generators/test_case'
module Rails
def self.root
@@ -8,8 +10,9 @@ end
Rails.application.config.root = Rails.root
Rails.application.config.generators.templates = [File.join(Rails.root, "lib", "templates")]
-require 'rails/generators'
-require 'rails/generators/test_case'
+# Call configure to load the settings from
+# Rails.application.config.generators to Rails::Generators
+Rails::Generators.configure!
require 'active_record'
require 'action_dispatch'