Commit 8bf80409 authored by Doug Stull's avatar Doug Stull Committed by Evan Read

Update rspec guidelines for aggregating failures

- Typically when we write tests, we try to only use one
  expectation per test.  However, that isn't always optimal.
  So in those cases where we have more than one expectation,
  we should try to use :aggregate_failures in order to see
  all the failures in a test block at once and not have to
  piecemeal through it as we get each to pass.
parent 95ad935b
......@@ -61,6 +61,7 @@ bundle exec rspec spec/[path]/[to]/[spec].rb
- When using `evaluate_script("$('.js-foo').testSomething()")` (or `execute_script`) which acts on a given element,
use a Capyabara matcher beforehand (e.g. `find('.js-foo')`) to ensure the element actually exists.
- Use `focus: true` to isolate parts of the specs you want to run.
- Use [`:aggregate_failures`](https://relishapp.com/rspec/rspec-core/docs/expectation-framework-integration/aggregating-failures) when there is more than one expectation in a test.
### System / Feature tests
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment