Skip to content

Instantly share code, notes, and snippets.

@joeriks
Created November 6, 2013 07:42
Show Gist options
  • Select an option

  • Save joeriks/7332368 to your computer and use it in GitHub Desktop.

Select an option

Save joeriks/7332368 to your computer and use it in GitHub Desktop.
Behaviour Driven Bugfixing
"This returns what it should"
.OldAssembly.ActuallyWorksWhen(...)
"But it obviously fails when we call it with x"
.OldAssembly.FailsWhen(...)
"New version should fix the errors"
.NewAssembly.ShouldStillWork()
.NewAssembly.ShouldBeFixed()
// reports
// "Fail: The 'actually works' assumption failed"
// "Fail: No errors in old version"
// "Fail: Not fixed in new version"
// "Fail: The fix broke something"
// "Success"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment