-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Testing
Run all basic rails tests with rake test
. This is required for submitting pull requests, and to confirm you have a working local environment.
rake test:all
runs all tests. This includes Jasmine client-side tests and Solr-dependent tests.
Client-side tests (for JavaScript functions) are run using Jasmine in jasmine-rails. You can run tests by navigating to /specs/
in the browser. Headless, or command-line test running may be possible with rake spec:javascript
if you have phantomjs installed (see above).
Solr (search) tests require installing the Solr search engine (see above). Once you've done that, you still need to turn it off in development mode before running tests, with rake sunspot:solr:stop
. Read more about this issue here.
If you get stuck on testing at any point, you can open a pull request with your changes -- please add the prefix [testing]
to the title -- which will then be automatically tested by our TravisCI service -- which runs all tests with rake test:all
. If your additions are pretty basic, and you write tests against them, this may be sufficient without actually running the whole environment yourself!
We are extremely interested in building our out test suite, so please consider helping us write tests!