diff options
author | Mohammed Siddick.E <siddick@gmail.com> | 2010-06-23 12:33:34 +0530 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-06-23 09:30:55 +0200 |
commit | 7008911222826eef07a338bf4cab27b83fe90ce1 (patch) | |
tree | 8e903ca66456b3e6f142256f02cc1b38b2bf284c /railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb | |
parent | d132dd33520ba61f7bfa9ba6fdd1b7b2bebd27f3 (diff) | |
download | rails-7008911222826eef07a338bf4cab27b83fe90ce1.tar.gz rails-7008911222826eef07a338bf4cab27b83fe90ce1.tar.bz2 rails-7008911222826eef07a338bf4cab27b83fe90ce1.zip |
Patch for Namespace problem in Scaffold. [#4763 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb')
-rw-r--r-- | railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb b/railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb index d5d3d6d5cd..957ebaa522 100644 --- a/railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb +++ b/railties/lib/rails/generators/test_unit/scaffold/templates/functional_test.rb @@ -2,7 +2,7 @@ require 'test_helper' class <%= controller_class_name %>ControllerTest < ActionController::TestCase setup do - @<%= file_name %> = <%= table_name %>(:one) + @<%= singular_table_name %> = <%= table_name %>(:one) end <% unless options[:singleton] -%> @@ -18,32 +18,32 @@ class <%= controller_class_name %>ControllerTest < ActionController::TestCase assert_response :success end - test "should create <%= file_name %>" do + test "should create <%= singular_table_name %>" do assert_difference('<%= class_name %>.count') do - post :create, :<%= file_name %> => @<%= file_name %>.attributes + post :create, :<%= singular_table_name %> => @<%= singular_table_name %>.attributes end - assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>)) + assert_redirected_to <%= singular_table_name %>_path(assigns(:<%= singular_table_name %>)) end - test "should show <%= file_name %>" do - get :show, :id => @<%= file_name %>.to_param + test "should show <%= singular_table_name %>" do + get :show, :id => @<%= singular_table_name %>.to_param assert_response :success end test "should get edit" do - get :edit, :id => @<%= file_name %>.to_param + get :edit, :id => @<%= singular_table_name %>.to_param assert_response :success end - test "should update <%= file_name %>" do - put :update, :id => @<%= file_name %>.to_param, :<%= file_name %> => @<%= file_name %>.attributes - assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>)) + test "should update <%= singular_table_name %>" do + put :update, :id => @<%= singular_table_name %>.to_param, :<%= singular_table_name %> => @<%= singular_table_name %>.attributes + assert_redirected_to <%= singular_table_name %>_path(assigns(:<%= singular_table_name %>)) end - test "should destroy <%= file_name %>" do + test "should destroy <%= singular_table_name %>" do assert_difference('<%= class_name %>.count', -1) do - delete :destroy, :id => @<%= file_name %>.to_param + delete :destroy, :id => @<%= singular_table_name %>.to_param end assert_redirected_to <%= index_helper %>_path |