We wanted to integrate the sunspot_rails gem into our cucumber features. I found a ticket where mat adviced to call Sunspot::Rails::Server.start / stop in one of the available cucumber hooks.
Code found in features/support/env.rb is run when Cucumber begins and exits so this seemed the right place to start Solr:
Sunspot::Rails::Server.new.start
at_exit do
Sunspot::Rails::Server.new.stop
end
Also, make sure you’ve [...]
Running cucumber features with sunspot_rails