Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require File.dirname(__FILE__) '/../test_helper'
- context "A user" do
- specify "should be able to be created" do
- user = create_user
- user.should.not.be.nil
- user.errors.should.be.empty
- end
- context "should not be created" do
- setup { @old_count = User.count }
- teardown { User.count.should.equal @old_count }
- specify "if password_confirmation doesn't match password" do
- user = create_user(:password => 'foo', :password_confirmation => 'bar')
- user.errors.on(:password).should.match /confirmation/
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement