public
Created

Simple setups

  • Download Gist
example_spec.rb
Ruby
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
describe "taking one down" do
let(:beer_count){50}
context "while we still have beers" do
it "will subtract 1 from the total number of beers" do
beers_on_the_wall = BeersOnTheWall.new(beer_count)
beers_on_the_wall.take_one_down
expect(beers_on_the_wall.count).to eql (beer_count - 1)
end
end
context "when all the beers have gone" do
it " will tell us there are no beers left" do
beers_on_the_wall = BeersOnTheWall.new(1)
beers_on_the_wall.take_one_down
expect(beers_on_the_wall.count).to eql "no more bottles of beers on the wall"
end
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.