Skip to content

Instantly share code, notes, and snippets.

@jhollingworth
Created May 7, 2010 12:28
Show Gist options
  • Save jhollingworth/393352 to your computer and use it in GitHub Desktop.
Save jhollingworth/393352 to your computer and use it in GitHub Desktop.
class DevTeamContext
{
protected static bool ExpectingException;
protected static Exception Exception;
protected static void dev_team_was_asked_to_do_a_rewrite()
{
var ex = Catch.Exception(() => DevTeam.ReWriteFromScratch());
if(ExpectingException)
Exception = ex;
else
throw ex;
}
}
class When_a_development_is_asked_to_do_a_rewrite : DevTeamContext
{
Establish context = () => ExpectingException = true;
Because the = dev_team_was_asked_to_do_a_rewrite;
It should_not_allow_the_dev_team_to_do_a_rewrite = () => Exception.ShouldBeOfType<ProgrammersBeenGivenTooMuchFreedomException>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment