添加预构件

This commit is contained in:
zhuhao 2015-01-24 10:35:46 +08:00
parent 167abcd6b4
commit ca17058750
1 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,11 @@ describe User do
it { should respond_to(:login) }
it { should respond_to(:mail) }
#此处采用与构建的方式生成数据
# it"is invalid without login" do
# user=FactoryGirl.build(:user,login: nil)
# expect(user).to_not be_valid
# end
#用户名唯一性的测试
describe "when login is already taken" do
before do