aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
diff options
context:
space:
mode:
authorMathias Meyer <meyer@paperplanes.de>2008-09-30 23:30:30 +0200
committerDavid Heinemeier Hansson <david@loudthinking.com>2008-10-30 12:57:52 +0100
commit7418d367f0ac4a4ac0ab4604c1b10db78efc6865 (patch)
treee3ec29741f892566ccda80455af07245f7948db9 /railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
parentdffc2e2b64c89fdb0303bd18eccc7351ed0a0a58 (diff)
downloadrails-7418d367f0ac4a4ac0ab4604c1b10db78efc6865.tar.gz
rails-7418d367f0ac4a4ac0ab4604c1b10db78efc6865.tar.bz2
rails-7418d367f0ac4a4ac0ab4604c1b10db78efc6865.zip
Fixed plugin generator so that generated unit tests would subclass ActiveSupport::TestCase, also introduced a helper script to reduce the needed require statements. [#1137 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb')
-rw-r--r--railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb b/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
index 615c575e6e..6826998252 100644
--- a/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
+++ b/railties/lib/rails_generator/generators/components/plugin/plugin_generator.rb
@@ -16,16 +16,16 @@ class PluginGenerator < Rails::Generator::NamedBase
m.directory "#{plugin_path}/tasks"
m.directory "#{plugin_path}/test"
- m.template 'README', "#{plugin_path}/README"
- m.template 'MIT-LICENSE', "#{plugin_path}/MIT-LICENSE"
- m.template 'Rakefile', "#{plugin_path}/Rakefile"
- m.template 'init.rb', "#{plugin_path}/init.rb"
- m.template 'install.rb', "#{plugin_path}/install.rb"
- m.template 'uninstall.rb', "#{plugin_path}/uninstall.rb"
- m.template 'plugin.rb', "#{plugin_path}/lib/#{file_name}.rb"
- m.template 'tasks.rake', "#{plugin_path}/tasks/#{file_name}_tasks.rake"
- m.template 'unit_test.rb', "#{plugin_path}/test/#{file_name}_test.rb"
-
+ m.template 'README', "#{plugin_path}/README"
+ m.template 'MIT-LICENSE', "#{plugin_path}/MIT-LICENSE"
+ m.template 'Rakefile', "#{plugin_path}/Rakefile"
+ m.template 'init.rb', "#{plugin_path}/init.rb"
+ m.template 'install.rb', "#{plugin_path}/install.rb"
+ m.template 'uninstall.rb', "#{plugin_path}/uninstall.rb"
+ m.template 'plugin.rb', "#{plugin_path}/lib/#{file_name}.rb"
+ m.template 'tasks.rake', "#{plugin_path}/tasks/#{file_name}_tasks.rake"
+ m.template 'unit_test.rb', "#{plugin_path}/test/#{file_name}_test.rb"
+ m.template 'test_helper.rb', "#{plugin_path}/test/test_helper.rb"
if @with_generator
m.directory "#{plugin_path}/generators"
m.directory "#{plugin_path}/generators/#{file_name}"