aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks/framework.rake
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/tasks/framework.rake')
-rw-r--r--railties/lib/rails/tasks/framework.rake47
1 files changed, 1 insertions, 46 deletions
diff --git a/railties/lib/rails/tasks/framework.rake b/railties/lib/rails/tasks/framework.rake
index a3109a9243..738f7f5301 100644
--- a/railties/lib/rails/tasks/framework.rake
+++ b/railties/lib/rails/tasks/framework.rake
@@ -17,7 +17,7 @@ namespace :rails do
end
desc "Update both configs, scripts and public/javascripts from Rails"
- task :update => [ "update:configs", "update:javascripts", "update:scripts", "update:application_controller", "update:test_directory" ]
+ task :update => [ "update:configs", "update:javascripts", "update:scripts", "update:application_controller" ]
desc "Applies the template supplied by LOCATION=/path/to/template"
task :template do
@@ -72,50 +72,5 @@ namespace :rails do
puts "#{old_style} has been renamed to #{new_style}, update your SCM as necessary"
end
end
-
- desc "Move test directories to new locations"
- task :test_directory do
- if File.exists?(Rails.root.join('test'))
- FileUtils.mkdir(Rails.root.join('test/controllers')) unless File.exists?(Rails.root.join('test/controllers'))
- [Rails.root.join('test/functional'), Rails.root.join('test/integration')].each do |controller_test_dir|
- if File.exists?(controller_test_dir)
- puts "#{controller_test_dir} exists"
- FileUtils.mv(Dir["#{controller_test_dir}/**/*"], Rails.root.join('test/controllers'), :force => true)
- FileUtils.rm_rf(controller_test_dir)
- end
- end
-
- if File.exists?(Rails.root.join('test/unit/helpers'))
- FileUtils.mkdir(Rails.root.join('test/helpers')) unless File.exists?(Rails.root.join('test/helpers'))
- FileUtils.mv(Dir[Rails.root.join('test/unit/helpers/**/*')], Rails.root.join('test/helpers'), :force => true)
- else
- unless File.exists?(Rails.root.join('test/helpers'))
- FileUtils.mkdir(Rails.root.join('test/helpers'))
- end
- end
-
- if File.exists?(Rails.root.join('test/unit'))
- observer_tests = "#{Rails.root}/test/unit/**/*_observer_test.rb"
- unless observer_tests.empty?
- FileUtils.mkdir(Rails.root.join('test/observers')) unless File.exists?(Rails.root.join('test/observers'))
- FileUtils.mv(observer_tests, Rails.root.join('test/observers'), :force => true)
- end
- FileUtils.mkdir(Rails.root.join('test/models')) unless File.exists?(Rails.root.join('test/models'))
- FileUtils.mv(Dir[Rails.root.join('test/unit/*')], Rails.root.join('test/models'), :force => true)
- FileUtils.rm_rf(Rails.root.join('test/unit'))
- end
- end
-
- puts <<-TEST
-
- All test directories have been updated:
-
- test/functional -> test/controllers
- test/functional -> test/controllers
- test/unit/helpers -> test/helpers
- test/unit/**/*_observer_test.rb -> test/observers
- test/unit -> test/models
- TEST
- end
end
end