Growstuff/growstuff — pull request #379 by tygriffin (2014-07-29 00:51:24+00:00)
Title: Crop suggest

Added auto-suggest functionality when choosing a crop on the new planting form using JQuery's autocomplete. The current implementation is a bit coupled to the planting form. That is, the auto-suggest Javascript can't be used for other forms without some copy and paste. It shouldn't be hard to change this into a more plug and play API, but I think that might be a waste of time at this stage. I'm guessing that the [rails4-autocomplete gem](https://github.com/peterwillcn/rails4-autocomplete) is a viable solution in the future if autocomplete becomes a necessary feature in other forms.

Changing this functionality, of course, resulted in failing view tests. In a pairing session with Chris, we fixed some of these, but I opted to delete a couple that were obsolete. I replaced them with feature tests. In order to run Javascript in feature tests, it was necessary to add the selenium-webdriver gem. I also add the database_cleaner gem for the reason explained in this [StackOverflow answer](http://stackoverflow.com/questions/15307742/integration-test-error-with-capybara-for-ajax-call-with-rails-3-2-12)