rspec, unknown attribute question

前端 未结 2 626
南笙
南笙 2021-02-07 12:19

I am working through the (excellent) railstutorial.org site have have a basic question about rspec.

When I run the below test on a new user model, I get an \"unknown att

2条回答
  •  既然无缘
    2021-02-07 12:49

    The field may be missing from your test database, but present in your development database (which is why the console is working).

    Try making sure your migrations are all up to date and then update the test database:

    rake db:migrate
    rake db:test:prepare
    

提交回复
热议问题