How to install
Install this sunspot_test from rubygems either directly:
gem install sunspot_test
Or through bundler
# in Gemfile gem "sunspot_test"
What does it do?
This gem will automatically start and stop solr for cucumber tests when using the @search tag. For instance, if you have a searchable book model this will allow you to create/query/destroy books.
@search Feature: Books Scenario: Searching for a book Given a book exists with a title of "Of Mice and Men"
Starting solr will depend on your settings in config/sunspot.yml. If you run into issues remember to look for existing java processes, starting solr may conflict with existing instances. You can also check out collectiveidea.com/blog/archives/2011/05/25/testing-with-sunspot-and-cucumber/ which contains a little more information.
Note on Patches/Pull Requests
Fork the project.
Make your feature addition or bug fix.
Add tests for it. This is important so I don't break it in a future version unintentionally.
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
Send me a pull request. Bonus points for topic branches.
Copyright © 2011 Zach Moazeni. See LICENSE for details.