From 38ee39a4a5e719694dca553ef739dbf99645c2b2 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 22 Jan 2005 14:39:03 +0000 Subject: Fixed that generate scaffold would produce bad functional tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- railties/generators/scaffold/templates/functional_test.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'railties/generators/scaffold/templates') diff --git a/railties/generators/scaffold/templates/functional_test.rb b/railties/generators/scaffold/templates/functional_test.rb index 1bf7d83694..004af030be 100644 --- a/railties/generators/scaffold/templates/functional_test.rb +++ b/railties/generators/scaffold/templates/functional_test.rb @@ -1,14 +1,14 @@ require File.dirname(__FILE__) + '/../test_helper' -require '<%= file_name %>_controller' +require '<%= @controller_name %>_controller' # Re-raise errors caught by the controller. -class <%= class_name %>Controller; def rescue_action(e) raise e end; end +class <%= @controller_class_name %>Controller; def rescue_action(e) raise e end; end -class <%= class_name %>ControllerTest < Test::Unit::TestCase +class <%= @controller_class_name %>ControllerTest < Test::Unit::TestCase fixtures :<%= table_name %> def setup - @controller = <%= class_name %>Controller.new + @controller = <%= @controller_class_name %>Controller.new @request, @response = ActionController::TestRequest.new, ActionController::TestResponse.new end -- cgit v1.2.3