This commit is contained in:
Avdi Grimm 2023-02-27 20:21:32 +09:00 committed by GitHub
commit 87f818c6da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 1 deletions

View File

@ -82,6 +82,20 @@ foreman start
This will start processes defined in `Procfile.dev`, which will give you: A Rails server, a Webpack server, a streaming API server, and Sidekiq. Of course, you can run any of those things stand-alone depending on your needs.
## Preparing to run tests
Prep the test database:
```sh
RAILS_ENV=test ./bin/rails db:setup
```
Generate test-mode precompiled assets:
```sh
RAILS_ENV=test NODE_ENV=tests ./bin/rails assets:precompile
```
## Useful commands for testing {#testing}
`rspec`
@ -102,4 +116,4 @@ This will start processes defined in `Procfile.dev`, which will give you: A Rail
: Update Javascript packages and install any new dependencies
`RAILS_ENV=development rails db:migrate`
: Run new database migrations for your development instance's database
: Run new database migrations for your development instance's database