diff options
author | Rizwan Reza <rizwanreza@gmail.com> | 2010-03-29 09:52:33 +0430 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-03-28 22:38:46 -0700 |
commit | a0dc6755db71b33aebccdb95fd0dd7097c934c04 (patch) | |
tree | 6be6fe842c6544c5cc3b8afb3e7e8dade8013d23 /railties/lib/rails/generators/test_unit | |
parent | 98d2d8ce2c2f332ee337b9ab2110300e1f2bf1f2 (diff) | |
download | rails-a0dc6755db71b33aebccdb95fd0dd7097c934c04.tar.gz rails-a0dc6755db71b33aebccdb95fd0dd7097c934c04.tar.bz2 rails-a0dc6755db71b33aebccdb95fd0dd7097c934c04.zip |
Reorganized app/test directory. [#3057 state:resolved]
Run 'rake update:test_directory' to reorganize your already generated apps.
test/functional -> test/controllers
test/functional -> test/controllers
test/unit/helpers -> test/helpers
test/unit/**/*_observer_test.rb -> test/observers
test/unit -> test/models
Diffstat (limited to 'railties/lib/rails/generators/test_unit')
-rw-r--r-- | railties/lib/rails/generators/test_unit/controller/controller_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/test_unit/helper/helper_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/test_unit/integration/integration_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/test_unit/mailer/templates/controller_test.rb (renamed from railties/lib/rails/generators/test_unit/mailer/templates/functional_test.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails/generators/test_unit/model/model_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/test_unit/observer/observer_generator.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb | 2 |
8 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/test_unit/controller/controller_generator.rb b/railties/lib/rails/generators/test_unit/controller/controller_generator.rb index 20f3bd8965..db99e55e9e 100644 --- a/railties/lib/rails/generators/test_unit/controller/controller_generator.rb +++ b/railties/lib/rails/generators/test_unit/controller/controller_generator.rb @@ -8,7 +8,7 @@ module TestUnit def create_test_files template 'functional_test.rb', - File.join('test/functional', class_path, "#{file_name}_controller_test.rb") + File.join('test/controllers', class_path, "#{file_name}_controller_test.rb") end end end diff --git a/railties/lib/rails/generators/test_unit/helper/helper_generator.rb b/railties/lib/rails/generators/test_unit/helper/helper_generator.rb index 4ea80bf7be..d4c287540c 100644 --- a/railties/lib/rails/generators/test_unit/helper/helper_generator.rb +++ b/railties/lib/rails/generators/test_unit/helper/helper_generator.rb @@ -6,7 +6,7 @@ module TestUnit check_class_collision :suffix => "HelperTest" def create_helper_files - template 'helper_test.rb', File.join('test/unit/helpers', class_path, "#{file_name}_helper_test.rb") + template 'helper_test.rb', File.join('test/helpers', class_path, "#{file_name}_helper_test.rb") end end end diff --git a/railties/lib/rails/generators/test_unit/integration/integration_generator.rb b/railties/lib/rails/generators/test_unit/integration/integration_generator.rb index 32d0fac029..af45998bc1 100644 --- a/railties/lib/rails/generators/test_unit/integration/integration_generator.rb +++ b/railties/lib/rails/generators/test_unit/integration/integration_generator.rb @@ -6,7 +6,7 @@ module TestUnit check_class_collision :suffix => "Test" def create_test_files - template 'integration_test.rb', File.join('test/integration', class_path, "#{file_name}_test.rb") + template 'integration_test.rb', File.join('test/controllers', class_path, "#{file_name}_test.rb") end end end diff --git a/railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb b/railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb index 1a49286d41..894d24049c 100644 --- a/railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb +++ b/railties/lib/rails/generators/test_unit/mailer/mailer_generator.rb @@ -7,7 +7,7 @@ module TestUnit check_class_collision :suffix => "Test" def create_test_files - template "functional_test.rb", File.join('test/functional', class_path, "#{file_name}_test.rb") + template "controller_test.rb", File.join('test/controllers', class_path, "#{file_name}_test.rb") end end end diff --git a/railties/lib/rails/generators/test_unit/mailer/templates/functional_test.rb b/railties/lib/rails/generators/test_unit/mailer/templates/controller_test.rb index 80ac7f0feb..80ac7f0feb 100644 --- a/railties/lib/rails/generators/test_unit/mailer/templates/functional_test.rb +++ b/railties/lib/rails/generators/test_unit/mailer/templates/controller_test.rb diff --git a/railties/lib/rails/generators/test_unit/model/model_generator.rb b/railties/lib/rails/generators/test_unit/model/model_generator.rb index 609b815683..17c431ae81 100644 --- a/railties/lib/rails/generators/test_unit/model/model_generator.rb +++ b/railties/lib/rails/generators/test_unit/model/model_generator.rb @@ -9,7 +9,7 @@ module TestUnit check_class_collision :suffix => "Test" def create_test_file - template 'unit_test.rb', File.join('test/unit', class_path, "#{file_name}_test.rb") + template 'unit_test.rb', File.join('test/models', class_path, "#{file_name}_test.rb") end hook_for :fixture_replacement diff --git a/railties/lib/rails/generators/test_unit/observer/observer_generator.rb b/railties/lib/rails/generators/test_unit/observer/observer_generator.rb index 6cc1158c21..5db111ec68 100644 --- a/railties/lib/rails/generators/test_unit/observer/observer_generator.rb +++ b/railties/lib/rails/generators/test_unit/observer/observer_generator.rb @@ -6,7 +6,7 @@ module TestUnit check_class_collision :suffix => "ObserverTest" def create_test_files - template 'unit_test.rb', File.join('test/unit', class_path, "#{file_name}_observer_test.rb") + template 'unit_test.rb', File.join('test/observers', class_path, "#{file_name}_observer_test.rb") end end end diff --git a/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb index c0315c7fe6..5d1ac1dde4 100644 --- a/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb +++ b/railties/lib/rails/generators/test_unit/scaffold/scaffold_generator.rb @@ -11,7 +11,7 @@ module TestUnit def create_test_files template 'functional_test.rb', - File.join('test/functional', controller_class_path, "#{controller_file_name}_controller_test.rb") + File.join('test/controllers', controller_class_path, "#{controller_file_name}_controller_test.rb") end end end |