提交 651bba1b 编写于 作者: Z Zachary Scott

We will be using the application already created in the Getting Started guide.

[ci skip]
上级 a504cbee
......@@ -144,11 +144,9 @@ Unit Testing your Models
In Rails, unit tests are what you write to test your models.
For this guide we will be using Rails _scaffolding_. It will create the model, a migration, controller and views for the new resource in a single operation. It will also create a full test suite following Rails best practices. We will be using examples from this generated code and will be supplementing it with additional examples where necessary.
For this guide we will be using the application we built in the [Getting Started with Rails](getting_started.html) guide.
NOTE: For more information on Rails _scaffolding_, refer to [Getting Started with Rails](getting_started.html)
When you use `rails generate scaffold`, for a resource among other things it creates a test stub in the `test/models` directory:
If you remember when you used the `rails generate scaffold` command from earlier. We created our first resource among other things it created a test stub in the `test/models` directory:
```bash
$ bin/rails generate scaffold article title:string body:text
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册