h1. Tools to Help You Develop and Test your Application h2. The Hydra Jetty The Hydra project provides a copy of Jetty with Fedora and Solr pre-installed. This is useful for running tests against and for running your code against while you're actively working on your hydra head. Most projects add hydra jetty to their code as a git submodule
  git submodule add git://github.com/projecthydra/hydra-jetty.git jetty
  git commit -m"added jetty submodule"
Now that you've added the submodule to your git repository, whenever you grab a new working copy of the code, you can get hydra-jetty by running:
git submodule init
git submodule update
*Important*: To apply the your application's solrconfig.xml and schema.xml to the copy of solr in hydra-jetty, run this:
  rake hydra:jetty:config
Now you're ready to start jetty. We've written a useful gem that gives you rake tasks for starting and stopping jetty. Make sure you have jettywrapper in your Gemfile
  gem "jettywrapper"
Then run
bundle install

Now that you have jettywrapper installed, to start jetty use

  rake jetty:start
To stop jetty
  rake jetty:stop
For more information about using jettywrapper, see http://hudson.projecthydra.org/job/jettywrapper/Documentation/ h2. RSpec and Cucumber for Testing We STRONGLY recommend that you write tests for every local change you make. This will allow you to ensure that upgrading the core code doesn't break any local changes you have made. (when should it be a feature rather than a spec) very basic rule: if it's testing something created with view, use a cucumber feature to test. If it's not created by view code, use a spec to test. h4. RSpec for Functional Tests Most Ruby projects use either RSpec or Shoulda to write and run their Functional Tests. We use RSpec for all of the Hydra software. To set up all the files you need to use rspec to test your Rails application, simply run the rspec generator. This will create a directory called "spec" and put all of the necessary files into it.
    rails g rspec:install
h4. Cucumber to Test User Experience If you will be writing cucumber tests, run the cucumber generator. This will create a directory called "features" and populate it with all the basic parts you need to run Cucumber tests on your Rails application.
rails g cucumber:install