title: testing: No route matches {:action=>"show", :controller=>"users", :id=>nil}
body: <p>I only have 2 weeks learning ruby and ruby on rails. 
  currently my problem is with te routes matches I don't understand so much, now I'm testing with rspec this:</p>
  
  <pre><code>require 'spec_helper'
  
  describe UsersController do
  
  it "should redirect to the user show page" do
  post :create, :users =&gt; @attr
  response.should redirect_to(user_path(assigns(:users)))
  end
    describe "signup" do
  
  before { visit new_user_registration_path }
  
  let(:submit) { "Sign up" }
  
  describe "with invalid information" do
    it "should not create a user" do
      expect { click_button submit }.not_to change(User, :count)
    end
  end
  
  describe "with valid information" do
    before do
      fill_in "Email", :with=&gt; "user@example.com"
      fill_in "Password", :with=&gt; "foobar"
      #fill_in "password_confirmation", :with=&gt; "foobar"
    end
  
    it "should create a user" do
      expect { click_button submit }.to change(User, :count).by(1)
    end
  end
  end
  end 
  </code></pre>
  
  <p>i have this on my UserController</p>
  
  <pre><code>class UsersController &lt; ApplicationController
  
  def new
       @user = User.new
  end
  
  def create
      @user = User.new(params[:user])
      if @user.save
          redirect_to user_session_path
      else
      redirect_to new_user_session_path
  end
  
  end
  
  def show
      @user = User.find(params[:id])
      #redirect_to @user
  end
  end
  </code></pre>
  
  <p>but when I run the test i got this error:</p>
  
  <pre><code>Failures:
  
  1) UsersController should redirect to the user show page
     Failure/Error: response.should redirect_to(user_path(assigns(:users)))
     ActionController::RoutingError:
     No route matches {:action=&gt;"show", :controller=&gt;"users", :id=&gt;nil}
     # ./spec/controllers/user_controller_spec.rb:7
  
  2) UsersController signup with valid information should create a user
     Failure/Error: expect { click_button submit }.to change(User, :count).by(1)
     count should have been changed by 1, but was changed by 0
     # ./spec/controllers/user_controller_spec.rb:29
  </code></pre>