Added inheritance spec to user

This commit is contained in:
Raphael 2010-06-23 11:28:53 -07:00
parent 129e84336b
commit 0ff87037cb
2 changed files with 12 additions and 0 deletions

View file

@ -1,4 +1,7 @@
require File.dirname(__FILE__) + '/../spec_helper'
describe UsersController do
before do
render_views
end
end

View file

@ -7,5 +7,14 @@ describe User do
u.real_name = "John Smith"
u.valid?.should be true
end
it "should create a valid user with the factory" do
u = Factory.build(:user)
u.valid?.should be true
end
it "should be a person" do
n = Person.count
Factory.create(:user)
Person.count.should == n+1
end
end