Skip to content

Instantly share code, notes, and snippets.

@achamian
Created August 24, 2010 10:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achamian/547321 to your computer and use it in GitHub Desktop.
Save achamian/547321 to your computer and use it in GitHub Desktop.
# config/routes.rb
MyApp::Application.routes.draw do
resources :users
end
# app/controllers/users_controller.rb
class UsersController < ApplicationController
def new
end
end
# spec/controllers/users_controller_spec.rb
require 'spec_helper'
describe UsersController do
it "should render a user registration page" do
session[:redirect_to] = users_path
get :new
response.should be_success
end
end
# => should render a user registration page
# => No route matches {:relative_url_root=>nil, :action=>"new"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment