From adc00e108744e746169b0098e1f706ead6f62147 Mon Sep 17 00:00:00 2001 From: Alex Ghiculescu Date: Mon, 9 Jan 2023 12:57:05 -0700 Subject: [PATCH] Simplify "Building for testing" Now that https://github.com/rails/rails/pull/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. --- README.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/README.md b/README.md index db1a12cd..3fa69ef7 100644 --- a/README.md +++ b/README.md @@ -28,13 +28,8 @@ The `tailwindcss:build` is automatically attached to `assets:precompile`, so bef ### Building for testing -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. +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. -If your tests need Tailwind assets in your CI environment, it's best to be explicit and run this command: - -``` -bin/rails test:prepare test -``` ### Update assets automatically