Example of app using ElasticSearch with tests!
https://www.lucascaton.com.br/2012/08/01/how-to-test-elasticsearch-in-a-rails-application
In order to copy the database schema to test database, run:
bundle exec rake db:test:prepare
In order to run the tests with Poltergeist, you need to install PhantomJS.