Fork and Clone this Repo
Once on your local, bundle install
.
In your terminal:
- Run
bundle exec rspec
to make sure all of your tests are passing. rails db:{drop,create,seed,migrate}
bundle exec rspec
will run all of the tests at once- If you want to run only a specific file use the following syntax:
bundle exec rspec spec/facades/geolocation_facade_spec.rb
- Add
:11
to the end of the previous line if you only want to run the test starting on line 11.
- Add
- If you are creating new requests to your local host delete the older vcr_cassettes to have more accurate responses.
spec/fixtures/vcr_cassettes
right click and deletevcr_cassettes
. - For the SimpleCov coverage report in the terminal run
open coverage/index.html
- Faraday gem to interact with APIs
- JSONAPI Serializer gem for formatting JSON responses
- Pry gem for debugging
- Rspec-Rails Base of all testing in this Repo
- Launchy gem for inspection and debugging
- Capybara gem for end to end testing
- ShouldaMatchers gem for testing assertions
- SimpleCov gem for code coverage tracking
- VCR / Webmock to stub HTTP requests in tests to simulate API interactions
- Postman to check API endpoints
The entire Postman suite is linked Here. Follow along to test the returns from the external APIs and the reponses that you are getting from your localhost API calls.
- Expose an API that aggregates data from multiple external APIs
- Expose an API that requires an authentication token
- Expose an API for CRUD functionality
- Determine completion criteria based on the needs of other developers
- Test both API consumption and exposure, making use of at least one mocking tool (VCR, Webmock, etc).
- Implementing the pillars of OOP.
- Creating a Postman suite boasting Happy and Sad path testing.
- Thorough testing of Controllers, Facades, Services, Serializers, and exposed API endpoints.