Skip to content

Commit adc00e1

Browse files
authored
Simplify "Building for testing"
Now that rails/rails#46664 is merged, we can simplify the testing instructions. Technically these instructions aren't true until Rails 7.1, so I'm happy to leave the PR open until then if that's preferred.
1 parent 6af664d commit adc00e1

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

README.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,8 @@ The `tailwindcss:build` is automatically attached to `assets:precompile`, so bef
2828

2929
### Building for testing
3030

31-
The `tailwindcss:build` task is automatically attached to the `test:prepare` Rake task. The `test:prepare` task is run before some test tasks (e.g. `test:all` and `test:controllers`), but not before the bare `test` task.
31+
The `tailwindcss:build` task is automatically attached to the `test:prepare` Rake task. This task runs before test commands. If you run `bin/rails test` in your CI environment, your Tailwind output will be generated before tests run.
3232

33-
If your tests need Tailwind assets in your CI environment, it's best to be explicit and run this command:
34-
35-
```
36-
bin/rails test:prepare test
37-
```
3833

3934
### Update assets automatically
4035

0 commit comments

Comments
 (0)