Skip to content

Instantly share code, notes, and snippets.

@jhollingworth
Created May 7, 2010 12:56
Show Gist options
  • Save jhollingworth/393381 to your computer and use it in GitHub Desktop.
Save jhollingworth/393381 to your computer and use it in GitHub Desktop.
class When_there_are_100_bottles_of_beer_on_the_wall : BottlesOfBeerContext
{
Establish there_are = () => 100.bottles_of_beer_on_the_wall();
Because we = take_one_down_and_pass_it_around;
It should_only_have_99_bottles_of_beer_on_the_wall = () => Bottles_of_beer_on_the_wall.ShouldEqual(99);
}
public static class BottlesOfBeerSetup
{
public static void bottles_of_beer_on_the_wall(this int numBottlesOfBeer)
{
BottlesOfBeerContext.Bottles_of_beer_on_the_wall = numBottlesOfBeer;
}
}
class BottlesOfBeerContext
{
public static int Bottles_of_beer_on_the_wall;
public static void take_one_down_and_pass_it_around() { }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment