Hi there.

My understanding (which is limited) is that rspec uses at_exit to run its
specs. I don't really know why - could somoene explain?

My problem with this behaviour is that I would like the running of a spec to
start an instance of solr (using Sunspot) if one is not running. The problem
with this is that Sunspot forks to start solr, and when these forks exit
they run my specs. At best this causes specs to be run more than once, at
worst it causes specs to fail in their hundreds.

I can fix this by adding an at_exit for each fork ...

    fork do
      ...
      at_exit { exit! }
    end

but this means changing the Sunspot code, which I really shouldn't have to
do to run specs. So is their anything else I can do. Ideally in spec_helper
or another rspec support file.

TIA

Andrew
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to