-
Notifications
You must be signed in to change notification settings - Fork 41
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
- Run the tests
rake ci
This rake task:- creates the test app in .internal_test_app
- spins up solr (in solr_wrapper)
- spins up fedora (in fcrepo_wrapper)
- imports fixtures
- runs rspec
- kills solr & fedora
In order to test the gem during development, you need to run solr and fedora instances using solr_wrapper and fcrepo_wrapper. The `rake ci` task automatically spins up test instances of these two services on randomly assigned test ports.
[TODO] UPDATE THESE INSTRUCTIONS TO REFLECT THE CHANGE TO ENGINE_CART
The gem must be tested within the context of a Rails ~3~ 4 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:
rake spec SPEC=spec/controllers/catalog_controller_spec.rb # path to the spec file you wish to run