Skip to content

Commit 50facb1

Browse files
committed
Update README
1 parent a758ccc commit 50facb1

File tree

1 file changed

+5
-23
lines changed

1 file changed

+5
-23
lines changed

README.md

+5-23
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,13 @@ This gem implements the `parallel_rspec` command for
55

66
This is a fork of the [spring-commands-rspec](https://github.com/jonleighton/spring-commands-rspec) gem to suppor the `parallel_rspec` command from the [parallel_tests](https://github.com/grosser/parallel_tests) gem.
77

8-
This gem also [patches Spring to reload the database configuration and reconnect the database](https://github.com/grosser/parallel_tests/wiki/Spring), which allows you to use `<%= ENV['TEST_ENV_NUMBER'] %>` in `database.yml`:
9-
10-
```ruby
11-
require 'spring/application'
12-
13-
class Spring::Application
14-
alias connect_database_orig connect_database
15-
16-
def connect_database
17-
disconnect_database
18-
reconfigure_database
19-
connect_database_orig
20-
end
21-
22-
def reconfigure_database
23-
if active_record_configured?
24-
ActiveRecord::Base.configurations =
25-
Rails.application.config.database_configuration
26-
end
27-
end
28-
end
29-
```
8+
This gem force-enables Spring, 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`.
309

31-
> [See the discussion on this GitHub issue](https://github.com/grosser/parallel_tests/issues/309).
10+
See these GitHub issues and PRs for more information:
3211

12+
* [parallel_tests#309](https://github.com/grosser/parallel_tests/issues/309)
13+
* [parallel_tests#468](https://github.com/grosser/parallel_tests/issues/468)
14+
* [parallel_tests#469](https://github.com/grosser/parallel_tests/issues/469)
3315

3416
## Usage
3517

0 commit comments

Comments
 (0)