The Convene interface is tested in two ways:
- Open-box unit and integration tests, which are defined in the
spec
folder - Closed-box story tests, which are defined in the top level
features
folder
Many enhancements and fixes can be made without updating the story tests, while almost all changes will want updated unit or integration tests.
For story tests, we use Cucumber to encourage us to write tests as human-friendly documentation.
For unit and integration tests, we use RSpec. RSpec is a nice complement to Cucumber, in that it allows us to directly integrate with the underlying Ruby and Rails code without writing human or computer interfaces that require inter-process communication.
This helps us write small, focused tests that deal with 1~3 Ruby classes instead of having to spin up a working instance of the entire application.
Tests that need database access should require "rails_helper"
, and tests that
can be executed without a database should require "spec_helper"
.
Last updated: April 2021
Original on Miro: https://miro.com/app/board/o9J_lLrbz1g=/