February 2019
Intermediate to advanced
240 pages
5h 25m
English
Having installed RSpec in our project, it’s not very satisfying to see zero tests running. Let’s rectify that right now by creating our first test, so that we can see some actual test code running.
Let’s generate a spec for our User model:
| | $ docker-compose exec web bin/rails generate rspec:model user |
| | create spec/models/user_spec.rb |
Linux Users: File Ownership | |||
|---|---|---|---|
|
|
Remember to chown the files we’ve generated so you can edit them (see File Ownership and Permissions):
| ||
Open the newly created spec/models/user_spec.rb file in your editor. ...