Created
February 15, 2012 23:39
-
-
Save aviflombaum/1840078 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
| require 'spec_helper' | |
| describe ProfilesController do | |
| context "as a User" do | |
| before(:each) do | |
| @user = Factory(:user) | |
| login_as(@user) | |
| end | |
| context "create a Profile" do | |
| context "given invalid attributes" do | |
| before(:each) do | |
| invalid_params = {:bio => ""} | |
| post :create, {:user_id => @user.id}.merge(invalid_params) | |
| end | |
| it "rejects a blank bio" do | |
| assigns(:profile).should_not be_valid | |
| end | |
| end | |
| end | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment