Skip to content

Instantly share code, notes, and snippets.

@mguterl
Created August 6, 2010 19:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mguterl/511874 to your computer and use it in GitHub Desktop.
Save mguterl/511874 to your computer and use it in GitHub Desktop.
module SunspotServerForkHackForRSpec
def self.included(base)
alias_method_chain :fork, :fix_for_rspec
end
def fork_with_fix_for_rspec
fork_without_fix_for_rspec do
yield
at_exit { exit! }
end
end
end
Sunspot::Server.send(:include, SunspotServerForkHackForRSpec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment