Commit d3b485b8b4925bfd4f7c0f4910f64496e7f961a5
1 parent
38aeb19a
Exists in
master
and in
29 other branches
Fix for starting/stopping Solr with tests
Showing
1 changed file
with
5 additions
and
2 deletions
Show diff stats
test/test_helper.rb
1 | ENV["RAILS_ENV"] = "test" | 1 | ENV["RAILS_ENV"] = "test" |
2 | 2 | ||
3 | # Start/stop Solr | 3 | # Start/stop Solr |
4 | -abort unless system 'rake solr:start' | ||
5 | -at_exit { system 'rake solr:stop' } | 4 | +if not $loaded |
5 | + abort unless system 'rake solr:start' | ||
6 | + at_exit { system 'rake solr:stop' } | ||
7 | + $loaded = true | ||
8 | +end | ||
6 | 9 | ||
7 | require File.expand_path(File.dirname(__FILE__) + "/../config/environment") | 10 | require File.expand_path(File.dirname(__FILE__) + "/../config/environment") |
8 | require 'test_help' | 11 | require 'test_help' |