Skip to content

Commit 022181e

Browse files
committed
Merge pull request #469 from grosser/grosser/override
allow spring to be force enabled
2 parents 125cd16 + 584bccd commit 022181e

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ TIPS
246246
- [Distributed parallel test (e.g. Travis Support)](https://github.com/grosser/parallel_tests/wiki/Distributed-Parallel-Tests-and-Travis-Support)
247247
- Debug errors that only happen with multiple files using `--verbose` and [cleanser](https://github.com/grosser/cleanser)
248248
- Shell alias: `alias prspec='parallel_rspec -m 2 --'`
249+
- [Spring] to use spring you have to [patch it](https://github.com/grosser/parallel_tests/wiki/Spring)
249250
- Contribute your own gotaches to the [Wiki](https://github.com/grosser/parallel_tests/wiki) or even better open a PR :)
250251

251252
TODO

lib/parallel_tests/cli.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class CLI
88
def run(argv)
99
options = parse_options!(argv)
1010

11-
ENV['DISABLE_SPRING']='1'
11+
ENV['DISABLE_SPRING'] ||= '1'
1212

1313
num_processes = ParallelTests.determine_number_of_processes(options[:count])
1414
num_processes = num_processes * (options[:multiply] || 1)

spec/integration_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@ def test_unicode
208208
expect(result).to include "SPRING: 1"
209209
end
210210

211+
it "can enable spring" do
212+
write "spec/xxx_spec.rb", 'puts "SPRING: #{ENV["DISABLE_SPRING"]}"'
213+
result = run_tests("spec", processes: 2, type: 'rspec', export: "DISABLE_SPRING=0")
214+
expect(result).to include "SPRING: 0"
215+
end
216+
211217
it "runs with files that have spaces" do
212218
write "test/xxx _test.rb", 'puts "YES"'
213219
result = run_tests("test", processes: 2, type: 'test')

0 commit comments

Comments
 (0)