Created
May 13, 2011 06:49
-
-
Save ericchen/970096 to your computer and use it in GitHub Desktop.
rspec test
This file contains 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
it "should not update email" do | |
lambda { | |
post :profile, {:user => {:email=>'', :first_name => 'jacky'}} | |
@user.reload | |
}.should_not change(@user, :email) | |
end | |
it "should update first name" do | |
expect { | |
post :profile, {:user => {:email=>'', :first_name => 'jacky'}} | |
@user.reload | |
}.to change(@user, :first_name) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment