Added inheritance spec to user
This commit is contained in:
parent
129e84336b
commit
0ff87037cb
2 changed files with 12 additions and 0 deletions
|
|
@ -1,4 +1,7 @@
|
|||
require File.dirname(__FILE__) + '/../spec_helper'
|
||||
|
||||
describe UsersController do
|
||||
before do
|
||||
render_views
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue