No route matches {:action=>"show", :controller=>"user", :id=>nil}
===

hello everybody i got this problem (title of the post)




Failure/Error: get :create, :user => { :email => 'foo@example.com', :name => 'userexample' }

ActionController::RoutingError:No route matches {:action=>"show", :controller=>"user", 

:id=>nil}

now, my usercontroller is this



    class UserController < ApplicationController
	
    def new

  	end
 
  	def create
  	@user = User.new(params[:user])
	@user.save
  	redirect_to :action => :show, :id => @user.id
	end

	def show
  	@user = User.find(params[:id])
	end
    end



here is my routes.rb

    ::Application.routes.draw do
  
    devise_for :users
    root :to => "user#index"
    resources :user
    #match "newuser" => "user#new"
    get "user/new"
    post "user/create"
    get "user/:id" => "user#show"



and here is my rspec test



    require 'spec/spec_helper'

    describe UserController do

	it "create new user" do
		get :create, :user => { :email => 'foo@example.com', :name => 'userexample'     }
		flash[:notice] = 'new user was successfully created.'
	end
    end