Commit d3b485b8b4925bfd4f7c0f4910f64496e7f961a5

Authored by Rafael Martins
1 parent 38aeb19a

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 1 ENV["RAILS_ENV"] = "test"
2 2  
3 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 10 require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
8 11 require 'test_help'
... ...