Created
October 14, 2012 21:42
-
-
Save bangline/3889910 to your computer and use it in GitHub Desktop.
Non-invariant example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "taking one down" do | |
Given(:beers_on_the_wall){ BeersOnTheWall.new(beer_count) } | |
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) } | |
end | |
context "when all the beers have gone" do | |
Given(:beers_on_the_wall){ BeersOnTheWall.new(1) } | |
# 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"} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment