diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-11 09:40:39 -0700 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-06-11 14:43:09 -0300 |
commit | 0391ae9a14af1a87ca435eb7777c73271e859ae0 (patch) | |
tree | fce44aa88f270328a9312b5cedbfeca2c0d7226d | |
parent | c9f27e3a479e17cd94248c007e4f528026bc18f6 (diff) | |
download | rails-0391ae9a14af1a87ca435eb7777c73271e859ae0.tar.gz rails-0391ae9a14af1a87ca435eb7777c73271e859ae0.tar.bz2 rails-0391ae9a14af1a87ca435eb7777c73271e859ae0.zip |
Merge pull request #6690 from suginoy/fix-templates-copy
Fix: 'rake rails:templates:copy' doesn't work
Conflicts:
railties/test/application/rake_test.rb
-rw-r--r-- | railties/lib/rails/tasks/framework.rake | 2 | ||||
-rw-r--r-- | railties/test/application/rake_test.rb | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake index 206ce39773..f9cff5b627 100644 --- a/railties/lib/rails/tasks/framework.rake +++ b/railties/lib/rails/tasks/framework.rake @@ -20,7 +20,7 @@ namespace :rails do project_templates = "#{Rails.root}/lib/templates" default_templates = { "erb" => %w{controller mailer scaffold}, - "rails" => %w{controller helper scaffold_controller stylesheets} } + "rails" => %w{controller helper scaffold_controller assets} } default_templates.each do |type, names| local_template_type_dir = File.join(project_templates, type) diff --git a/railties/test/application/rake_test.rb b/railties/test/application/rake_test.rb index 4b39c7f5bc..ab9084df55 100644 --- a/railties/test/application/rake_test.rb +++ b/railties/test/application/rake_test.rb @@ -150,5 +150,17 @@ module ApplicationTests # expect only Invoke db:structure:dump (first_time) assert_no_match(/^\*\* Invoke db:structure:dump\s+$/, output) end + + def test_copy_templates + Dir.chdir(app_path) do + `bundle exec rake rails:templates:copy` + %w(controller mailer scaffold).each do |dir| + assert File.exists?(File.join(app_path, 'lib', 'templates', 'erb', dir)) + end + %w(controller helper scaffold_controller assets).each do |dir| + assert File.exists?(File.join(app_path, 'lib', 'templates', 'rails', dir)) + end + end + end end end |