-
Notifications
You must be signed in to change notification settings - Fork 0
For Contributors
- Clone the Hydra-Head code (to a fresh working copy)
git clone [email protected]:projecthydra/hydra-head.git
- Switch to the hydra-head directory
cd hydra-head
- Install bundler gem
gem install bundler
- Get the project dependencies
bundle install
- Grab the jetty submodule
git submodule init; git submodule update
- Run the tests
rake ci
This rake task:- creates the test apps in hydra-core/spec/internal and hydra-file-access/spec/internal
- spins up jetty (in jettywrapper)
- imports fixtures
- runs rspec
- kills jetty (in jettywrapper)
In order to test the gem during development, the hydra-jetty is included as a submodule to provide both a fedora and solr instance. Once you have cloned the github repository, run the following commands to load hydra-jetty:
git submodule init git submodule update
To start jetty:
rake jetty:start
Note: the first time you start hydra-jetty, you must use the following command in order to properly configure jetty:
rake hydra:jetty:load
The gem must be tested within the context of a Rails 3 application.
A rake task is provided for setting up a rails 3 test app in the hydra-core/spec/internal and hydra-file-access/spec/internal directories. To generate the app, run:
rake generate
The specs fixtures for testing the Hydra-Head gem are all contained within the spec/support directories of the gems. Once you have installed the test app and have Hydra-Jetty running, you will be able to run the specs for each gem via the provided rake tasks.
In order to run a single spec use the following from the command line:
export RAILS_ROOT="spec/internal" rspec spec/controllers/catalog_controller_spec.rb # path to the spec file you wish to run