From 9982b5af94746263419c88668972b260d33a0770 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Fri, 15 Apr 2011 21:32:36 +0200 Subject: Fix missing test_helper. --- railties/lib/rails/generators/rails/app/app_generator.rb | 3 ++- .../generators/rails/app/templates/test/test_helper.rb | 15 +++++++++++++++ .../generators/rails/app/templates/test/test_helper.rb.tt | 15 --------------- 3 files changed, 17 insertions(+), 16 deletions(-) create mode 100644 railties/lib/rails/generators/rails/app/templates/test/test_helper.rb delete mode 100644 railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt (limited to 'railties/lib/rails/generators') diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index 93d6c1f827..8d74fe2c94 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -106,7 +106,8 @@ module Rails empty_directory_with_gitkeep "test/integration" empty_directory_with_gitkeep "test/unit" - copy_file "test/performance/browsing_test.rb" + template "test/performance/browsing_test.rb" + template "test/test_helper.rb" end def tmp 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 new file mode 100644 index 0000000000..a8f7aeac7d --- /dev/null +++ b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb @@ -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_active_record] -%> + # 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 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 deleted file mode 100644 index a8f7aeac7d..0000000000 --- a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb.tt +++ /dev/null @@ -1,15 +0,0 @@ -ENV["RAILS_ENV"] = "test" -require File.expand_path('../../config/environment', __FILE__) -require 'rails/test_help' - -class ActiveSupport::TestCase -<% unless options[:skip_active_record] -%> - # 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