Skip to content

Commit

Permalink
allow spring to be force enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
grosser committed Dec 3, 2015
1 parent f954b2a commit aec41bc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ TIPS
- [Distributed parallel test (e.g. Travis Support)](https://github.com/grosser/parallel_tests/wiki/Distributed-Parallel-Tests-and-Travis-Support)
- Debug errors that only happen with multiple files using `--verbose` and [cleanser](https://github.com/grosser/cleanser)
- Shell alias: `alias prspec='parallel_rspec -m 2 --'`
- [Spring] to use spring you have to [patch it](https://github.com/grosser/parallel_tests/wiki)
- Contribute your own gotaches to the [Wiki](https://github.com/grosser/parallel_tests/wiki) or even better open a PR :)

TODO
Expand Down
2 changes: 1 addition & 1 deletion lib/parallel_tests/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class CLI
def run(argv)
options = parse_options!(argv)

ENV['DISABLE_SPRING']='1'
ENV['DISABLE_SPRING'] ||= '1'

num_processes = ParallelTests.determine_number_of_processes(options[:count])
num_processes = num_processes * (options[:multiply] || 1)
Expand Down
6 changes: 6 additions & 0 deletions spec/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ def test_unicode
expect(result).to include "SPRING: 1"
end

it "can enable spring" do
write "spec/xxx_spec.rb", 'puts "SPRING: #{ENV["DISABLE_SPRING"]}"'
result = run_tests("spec", processes: 2, type: 'rspec', export: "DISABLE_SPRING=0")
expect(result).to include "SPRING: 0"
end

it "runs with files that have spaces" do
write "test/xxx _test.rb", 'puts "YES"'
result = run_tests("test", processes: 2, type: 'test')
Expand Down

0 comments on commit aec41bc

Please sign in to comment.