Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Non-invariant example
describe "taking one down" do
Given(:beers_on_the_wall){ }
When{ beers_on_the_wall.take_one_down }
context "while we still have beers" do
Then{ expect(beers_on_the_wall.count).to eql (beer_count - 1) }
context "when all the beers have gone" do
Given(:beers_on_the_wall){ }
# or Given{ beers_on_the_wall.beers = 1 }
Then{ expect(beers_on_the_wall.count).to eql "no more bottles of beers on the wall"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment