-
Notifications
You must be signed in to change notification settings - Fork 41
For Contributors
Max Kadel edited this page Mar 12, 2021
·
15 revisions
- Clone the Hydra-Head code (to a fresh working copy)
git clone [email protected]:samvera/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
bundle exec 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
Testing the gem
Sometimes in the course of generating the internal_test_app the Gemfile.lock of the gem itself and the internal_test_app’s Gemfile.lock can get out of sync. If that happens, you can run bundle update [angry_gem]
. If you are testing and decide to use different versions of Ruby or particular gems, you can delete both Gemfile.lock files and re-bundle using bundle install
.
In order to run a single spec, in one terminal window start the test server using
bundle exec rake test_server
then in another window use the following from the command line:
bundle exec rake spec SPEC=spec/controllers/catalog_controller_spec.rb # path to the spec file you wish to run
When running individual tests, you may get success on one gem and failure on the other gem – this is expected, since some tests exist only in a single gem.