Created by scaffolding... class PostsControllerTest < Test::Unit::TestCase . . . def test_should_create_post old_count = Post.count post :create, :post => { } assert_equal old_count+1, Post.count assert_redirected_to post_path(assigns(:post)) end . . . end