Skip to content

Commit 0239a1c

Browse files
Add testing documentation
1 parent ec28057 commit 0239a1c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,20 @@ rails generate critical_path_css:install
126126

127127
Answer 'Y' when prompted to overwrite `critical_path_css.rake`. However, overwriting `critical_path_css.yml` is not necessary and not recommended.
128128

129+
130+
## Testing
131+
132+
This gem is to be tested inside of docker/docker-compose. [Combustion](https://github.com/pat/combustion), alongside rspec-rails and capybara, are the primary components for testing. To run the test, you'll need to have [Docker](https://docs.docker.com/engine/installation) installed. Once installed, run the following commands in the gem's root to build, run, and shell into the docker container.
133+
134+
```Bash
135+
docker-compose build
136+
docker-compose up -d
137+
docker exec -it $(cat app_container_name) /bin/bash
138+
```
139+
140+
Once shell'd in, run `bundle exec rspec spec` to run the test. The test rails app lives in `spec/internal`, and it can be viewed locally at `http://localhost:9292/`
141+
142+
129143
## Versions
130144

131145
The critical-path-css-rails gem follows these version guidelines:

0 commit comments

Comments
 (0)