HomePhorge

(doc) Update rspec examples to show desired style
770194f5ccf1Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(doc) Update rspec examples to show desired style

There are a couple stylistic points about rspec that we need to follow:

  • be explicit
  • say what it does

"Be explicity" means that we use before :each instead of before.
This lowers the amount of mental energy that a reader needs to use to
understand how things will fit together.

"Say what it does" means that the examples read as declarations of what
the system under test *does*. A writer must avoid wish-washy words such
as "should" or "could" or "may". Instead state exactly what the system
does in that situation.

Details

Provenance
Andrew Parker <andy@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUfac2f114e6fa: (doc) Point readers to how to run acceptance tests
Branches
Unknown
Tags
Unknown

Event Timeline

Andrew Parker <andy@puppetlabs.com> committed rPU770194f5ccf1: (doc) Update rspec examples to show desired style (authored by Andrew Parker <andy@puppetlabs.com>).Feb 7 2014, 6:45 PM