Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #6690 from suginoy/fix-templates-copy

Fix: 'rake rails:templates:copy' doesn't work
Conflicts:
	railties/test/application/rake_test.rb
  • Loading branch information...
commit 0391ae9a14af1a87ca435eb7777c73271e859ae0 1 parent c9f27e3
Rafael Mendonça França rafaelfranca authored
2  railties/lib/rails/tasks/framework.rake
View
@@ -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)
12 railties/test/application/rake_test.rb
View
@@ -150,5 +150,17 @@ def test_rake_dump_structure_should_be_called_twice_when_migrate_redo
# 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
Please sign in to comment.
Something went wrong with that request. Please try again.