push for rafi

This commit is contained in:
maxwell 2010-06-12 15:55:29 -07:00
parent e068707158
commit 8b0c3725a5
2 changed files with 13 additions and 3 deletions

View file

@ -2,4 +2,10 @@ class User
include Mongoid::Document
field :password
field :name
validates :password, :presence => true
validates :name, :presence =>true
end

View file

@ -2,13 +2,17 @@ require 'spec_helper'
describe 'a user should be able to log into his seed' do
before do
User.all.each {|x| x.delete}
User.delete_all
end
it 'should should have a name and password' do
User.count.should == 0
billy = User.create
User.count.should == 1
billy = User.new
User.count.should == 0
billy.save
User.count.should == 0
end
it 'should be able to log into a page with a password' do