diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-22 14:39:03 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-01-22 14:39:03 +0000 |
commit | 38ee39a4a5e719694dca553ef739dbf99645c2b2 (patch) | |
tree | a2c9f129be5fd19dd4130b43be5c2786431cd142 /railties/generators/scaffold/templates | |
parent | bbd3e3966876ff76f33fee5b633004a1c636688c (diff) | |
download | rails-38ee39a4a5e719694dca553ef739dbf99645c2b2.tar.gz rails-38ee39a4a5e719694dca553ef739dbf99645c2b2.tar.bz2 rails-38ee39a4a5e719694dca553ef739dbf99645c2b2.zip |
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
Diffstat (limited to 'railties/generators/scaffold/templates')
-rw-r--r-- | railties/generators/scaffold/templates/functional_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
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 |