FailFast

Free development tool that will provide Ruby developers with declarative assumption-checking
Download

FailFast Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Freeware
  • Price:
  • FREE
  • Publisher Name:
  • Avdi Grimm
  • Publisher web site:
  • http://avdi.org/
  • Operating Systems:
  • Mac OS X
  • File Size:
  • 15 KB

FailFast Tags


FailFast Description

Free development tool that will provide Ruby developers with declarative assumption-checking FailFast is a collection of assertion methods intended for lightweight contract checking.Unexpected nils and other bad values will usually bring a Ruby program down eventually, but the actual point of failure might be deep down the call stack and the error message less than revealing. Judicious use of FailFast assertions to check your assumptions can ensures that the program will end as soon as a contract violation is detected, with a stack trace that points directly at the assertion which failed.One of the primary goals of FailFast is to make assumption-checking declarative. Assumption checking should be simple and concise so that we can get to the meat of a method without getting bogged down in verifications. At the same time, FailFast is lightweight. FailFast is not a meta-programmed Design-by-Contract DSL. FailFast is just a simple set of shorthand methods for validating values.It is not the intent of FailFast to have specialized assertions for every eventuality. Rather, it seeks to cover a few common cases where there is a potential for significantly increased clarity and declarativeness. Here are some key features of "FailFast": · Fully spec’d/tested. · In most cases assertions return their last argument. This makes it easy to check values inline. For instance: assert_exists(obj).foo() · Most assertions can take a block where a further boolean check can be performed. For instance, use assert_exists(x) { x.predicate? } to check first that x is not nil, and then that it satisfies a predicate. · AssertionFailure derives directly from Exception so that it will never be silently eaten by no-argument catch statements.


FailFast Related Software