Skip to content

Commit

Permalink
Added info about the spring-commands-parallel-tests gem to get everyt…
Browse files Browse the repository at this point in the history
…hing working with Spring
  • Loading branch information
ndbroadbent committed Dec 7, 2019
1 parent e96a0e1 commit 8303ae3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,16 @@ TIPS
- Combines many JSON files into a single file
- Builds a HTML report from JSON with support for debug msgs & embedded Base64 images.

### Spring

To use the `parallel_rspec` command with Spring, you can add the [spring-commands-parallel-rspec](https://github.com/DocSpring/spring-commands-parallel-rspec) gem to your `Gemfile`:

``` ruby
gem 'spring-commands-parallel-rspec', group: :development
```

This gem will force-enable Spring by default, since `parallel_tests` [disables Spring by default](https://github.com/grosser/parallel_tests/blob/master/lib/parallel_tests/cli.rb#L13). It also automatically [patches Spring to reload the database configuration](https://github.com/grosser/parallel_tests/wiki/Spring), which allows you to use `<%= ENV['TEST_ENV_NUMBER'] %>` in `database.yml`.

### General
- [SQL schema format] use :ruby schema format to get faster parallel:prepare`
- [ZSH] use quotes to use rake arguments `rake "parallel:prepare[3]"`
Expand All @@ -273,7 +283,6 @@ TIPS
- Debug errors that only happen with multiple files using `--verbose` and [cleanser](https://github.com/grosser/cleanser)
- `export PARALLEL_TEST_PROCESSORS=13` to override default processor count
- Shell alias: `alias prspec='parallel_rspec -m 2 --'`
- [Spring] to use spring you have to [patch it](https://github.com/grosser/parallel_tests/wiki/Spring)
- `--first-is-1` will make the first environment be `1`, so you can test while running your full suite.<br/>
`export PARALLEL_TEST_FIRST_IS_1=true` will provide the same result
- [email_spec and/or action_mailer_cache_delivery](https://github.com/grosser/parallel_tests/wiki)
Expand Down

0 comments on commit 8303ae3

Please sign in to comment.