Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: 'rake rails:templates:copy' doesn't work #6690

Merged
merged 2 commits into from
Jun 11, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion railties/lib/rails/tasks/framework.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
11 changes: 11 additions & 0 deletions railties/test/application/rake_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -190,5 +190,16 @@ def test_load_activerecord_base_when_we_use_observers
end
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