Skip to content

RspecGiven

jimweirich edited this page Aug 29, 2012 · 3 revisions

RSpec/Given

rspec-given is an RSpec extension to allow Given/When/Then notation in RSpec specifications. It is a natural extension of the experimental work done on the Given framework. It turns out that 90% of the Given framework can be trivially implemented on top of RSpec.

Why

Have you ever written a test or it was unclear what the subject of the test was, what the code under test was? Well RSpec/Given solves that problem by clearly denoting what part of your test is setup, what part is under test, and what the expected results are.