From cb8fa3573c7cfcbc8a59acb6cfbde99f71dcccaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 9 Apr 2010 08:47:19 +0200 Subject: Still use the directory command and also remove the fixture comments. --- railties/lib/rails/generators/rails/app/app_generator.rb | 12 +----------- .../generators/rails/app/templates/test/test_helper.rb | 15 --------------- .../generators/rails/app/templates/test/test_helper.rb.tt | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 26 deletions(-) delete mode 100644 railties/lib/rails/generators/rails/app/templates/test/test_helper.rb create mode 100644 railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt (limited to 'railties/lib/rails') diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 6d085f0935..df6e98f38d 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -157,17 +157,7 @@ module Rails::Generators def create_test_files return if options[:skip_testunit] - empty_directory "test" - - inside "test" do - template "test_helper.rb" - - directory "fixtures" - directory "functional" - directory "integration" - directory "performance" - directory "unit" - end + directory "test" end def create_tmp_files diff --git a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb deleted file mode 100644 index c5e9cc2fc3..0000000000 --- a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb +++ /dev/null @@ -1,15 +0,0 @@ -ENV["RAILS_ENV"] = "test" -require File.expand_path('../../config/environment', __FILE__) -require 'rails/test_help' - -class ActiveSupport::TestCase - # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. - # - # Note: You'll currently still have to declare fixtures explicitly in integration tests - # -- they do not yet inherit this setting -<% unless options[:skip_activerecord] -%> - fixtures :all -<% end -%> - - # Add more helper methods to be used by all tests here... -end diff --git a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt new file mode 100644 index 0000000000..86564031f5 --- /dev/null +++ b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt @@ -0,0 +1,15 @@ +ENV["RAILS_ENV"] = "test" +require File.expand_path('../../config/environment', __FILE__) +require 'rails/test_help' + +class ActiveSupport::TestCase +<% unless options[:skip_activerecord] -%> + # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order. + # + # Note: You'll currently still have to declare fixtures explicitly in integration tests + # -- they do not yet inherit this setting + fixtures :all + +<% end -%> + # Add more helper methods to be used by all tests here... +end -- cgit v1.2.3