-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
An error occurred in an after hook #9
Comments
Do you get the same error when you run a single spec which does not use Sunspot/Solr? |
Nop.. when the spec didn't use Sunspot, it run well.. Anyway I restarted the system and it seems to work well now!
That code crashed the test, I suppose this is caused by 'Sunspot.remove_all!' since it deletes the index of the objects being created in the tests, so Sunspot doesn't find them.. when I removed that line it worked. |
Ummm, I don't have a Rails 4 project which uses Sunspot in order to reproduce this. The odd thing is the error seems to have something to do with rspec view_rendering, which would indicate its not anything to do with sunspot-rails-tester, however if removing the I couldn't tell from your previous message is it working now or are you still getting the error? |
Excuse me, i've bombarded you.. |
Understood, what is the new error for Without that line the specs may pass but I think you might find that the Solr index is not deleted between specs. I think if the Solr index returns a hit but a matching record does not exist in the database it automtically handles this and ignores the hit. This might come back to bite you later. As the index will be out of sync with whats in the database. Always best to remove all state between specs. |
Actually it's not an error, the sunspot search simply doesn't perform.. Instead of put that line in a |
I couldn't find a Rails 4 branch of Sunspot, can you show me what the 'sunspot' line looks like in your Gemfile. If the search just doesn't perform its an issue with sunspot itself, not sunspot-rails-tester, however you should be able to put |
Hi, I haven't much experience testing sunspot.. :(
Once installed the gem and set the configuration I ran rspec and got this error message:
What that means? I suspect that's something related with the configuration of rspec.. but I don't know what it is..
The text was updated successfully, but these errors were encountered: