diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2008-06-12 20:10:50 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-06-12 20:10:50 -0500 |
commit | e536d4d8881263d1d0c26a9d5ff69e1a2875c63f (patch) | |
tree | 5a51c05937430cfe211665464998b26d344300a9 /railties/lib/rails_generator/generators/components/scaffold/templates | |
parent | f74ba37f4e4175d5a1b31da59d161b0020b58e94 (diff) | |
download | rails-e536d4d8881263d1d0c26a9d5ff69e1a2875c63f.tar.gz rails-e536d4d8881263d1d0c26a9d5ff69e1a2875c63f.tar.bz2 rails-e536d4d8881263d1d0c26a9d5ff69e1a2875c63f.zip |
Changed all generated tests to use the test/do declaration style [DHH]
Diffstat (limited to 'railties/lib/rails_generator/generators/components/scaffold/templates')
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb index 3b430a2061..2d9d635944 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb @@ -1,18 +1,18 @@ require 'test_helper' class <%= controller_class_name %>ControllerTest < ActionController::TestCase - def test_should_get_index + test "should get index" do get :index assert_response :success assert_not_nil assigns(:<%= table_name %>) end - def test_should_get_new + test "should get new" do get :new assert_response :success end - def test_should_create_<%= file_name %> + test "should create <%= file_name %>" do assert_difference('<%= class_name %>.count') do post :create, :<%= file_name %> => { } end @@ -20,22 +20,22 @@ class <%= controller_class_name %>ControllerTest < ActionController::TestCase assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>)) end - def test_should_show_<%= file_name %> + test "should show <%= file_name %>" do get :show, :id => <%= table_name %>(:one).id assert_response :success end - def test_should_get_edit + test "should get edit" do get :edit, :id => <%= table_name %>(:one).id assert_response :success end - def test_should_update_<%= file_name %> + test "should update <%= file_name %>" do put :update, :id => <%= table_name %>(:one).id, :<%= file_name %> => { } assert_redirected_to <%= file_name %>_path(assigns(:<%= file_name %>)) end - def test_should_destroy_<%= file_name %> + test "should destroy <%= file_name %>" do assert_difference('<%= class_name %>.count', -1) do delete :destroy, :id => <%= table_name %>(:one).id end |