Skip to content

Instantly share code, notes, and snippets.

@bsommardahl
Created August 7, 2012 23:52
Show Gist options
  • Save bsommardahl/3290657 to your computer and use it in GitHub Desktop.
Save bsommardahl/3290657 to your computer and use it in GitHub Desktop.
Plumber fails to leave trash
public class when_a_plumber_fixes_a_sink
{
static Plumber _plumber;
static Sink _sink;
Establish context = () =>
{
_plumber = new Plumber();
_sink = new Sink
{
Leaks = new List<Leak>
{
new Leak(),
new Leak()
},
Floor = new Floor
{
Trash = new List<Trash>()
}
};
};
Because of = () => _plumber.FixSink(_sink);
It should_ensure_that_the_pipes_do_not_leak = () => _sink.Leaks.ShouldBeEmpty();
It should_reveal_his_crack = () => _plumber.CrackShowing.ShouldBeTrue();
It should_leave_trash_on_the_floor = () => _sink.Floor.Trash.ShouldNotBeEmpty();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment