Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Latest commit

 

History

History
51 lines (37 loc) · 2.68 KB

TEST.md

File metadata and controls

51 lines (37 loc) · 2.68 KB

How to Setup and Run Tests

MyUSA uses several different tools for testing various aspects of its operation:

  • Rspec, a behavior-driven development testing framework for Ruby
  • Capybara, a library for integration testing
  • Code Climate, a service for automated code reviews

These testing mechanisms use some additional tools to get what they need done

All of these are installed automatically when you run the bundle install step within INSTALL.md, but you will also have to run an additional command to install PhantomJS locally:

brew install phantomjs

Running the Tests

To run the tests, simply type this at the command line

bundle exec rake

This will run for a while and print out a . to the screen for every test that runs successfully. When it is finished, you should see something like this

Pending:
  Api::V1 Authorized Scopes API need to figure out how to query for scopes with Doorkeeper
    # No reason given
    # ./spec/requests/v1/api_spec.rb:344
  Api::V1 GET /api/v1/profile when the user queried exists when the schema parameter is set need to understand Schema.org requirement
    # No reason given
    # ./spec/requests/v1/api_spec.rb:107

Finished in 28.09 seconds (files took 4.35 seconds to load)
386 examples, 0 failures, 2 pending

There may be several tests that are marked as pending. These are tests that were deactivated for some reason or another and do not necessarily indicate a test failure. There is only a problem if you see a failures number that is greater than 0.