Skip to content

Instantly share code, notes, and snippets.

Created March 9, 2014 09:57
Show Gist options
  • Save anonymous/9445449 to your computer and use it in GitHub Desktop.
Save anonymous/9445449 to your computer and use it in GitHub Desktop.
require 'spec_helper'
describe UsersController do
let(:user) { User.new }
describe '#show' do
it 'assigns @user' do
user.stub(:find_by_username).and_return(User.new)
get :show, :username => 'chridal'
assigns(:user).should be_a(User)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment