Created
August 24, 2010 10:19
-
-
Save achamian/547321 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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