From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.5 required=5.0 tests=AWL,URIBL_BLACK autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 2FBC9BBAF for ; Sun, 19 Apr 2009 20:12:22 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjkEABcG60nIuX5CgWdsb2JhbACWOQEBFiK1OIN9Bg X-IronPort-AV: E=Sophos;i="4.40,213,1238968800"; d="scan'208";a="24821738" Received: from unknown (HELO mta19.f3.k8.com.br) ([200.185.126.66]) by mail2-smtp-roc.national.inria.fr with ESMTP; 19 Apr 2009 20:12:21 +0200 Received: from localhost (localhost [127.0.0.1]) by smtpa.f3.k8.com.br (Postfix) with ESMTP id B358E280008B for ; Sun, 19 Apr 2009 18:12:16 +0000 (GMT) X-Virus-Scanned: amavisd-new at k8.com.br Received: from smtpa.f3.k8.com.br ([127.0.0.1]) by localhost (mta19.f3.k8.com.br [127.0.0.1]) (amavisd-new, port 10024) with LMTP id EHtn+BqlEVcC for ; Sun, 19 Apr 2009 18:12:16 +0000 (GMT) Received: from [189.106.160.45] (unknown [189.106.160.45]) by smtpa.f3.k8.com.br (Postfix) with ESMTP id EF574280008A for ; Sun, 19 Apr 2009 18:12:10 +0000 (GMT) Subject: [ANN] OSpec 0.2.0 - BDD for OCaml From: Andre Nathan To: caml-list@inria.fr Content-Type: text/plain Date: Sun, 19 Apr 2009 15:17:36 -0300 Message-Id: <1240165056.6223.16.camel@homesick> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocaml:01 ocaml:01 camlp:01 syntax:01 regexp:01 forall:01 forall:01 bug:01 nathan:98 exceptions:01 tree:02 match:02 string:02 predefined:03 readme:03 Hello I'm happy to announce a new version of OSpec, a Behavior-Driven Development tool for OCaml using a Camlp4 syntax extension. You can download this release from the ocamlcore forge at http://forge.ocamlcore.org/projects/ospec/ or directly clone the repository from Github: http://github.com/andrenth/ospec/tree/master == New features: * Nested specifications: it is now possible to group related examples in a nested "describe" block. For example, describe "Person" do describe "name" do it "should not be empty" do (String.length person.name) should be > 0 done; it "should only contain valid characters" do (person.name) should match_regexp "^[A-Za-z- ]+$" done done done * Property testing (inspired by QuickCheck): OSpec can now autogenerate test cases with the "forall" keyword. For example, describe "A list" do it "should equal itself when reversed twice" do forall list l . (List.rev (List.rev l)) should = l done done This will generate lists of random length and test each one against the specified property. There are 28 predefined random sample generators for the basic OCaml types which can be used directly in tests or as building blocks for custom generators. * Better error handling: exceptions in the specifications are now caught and reported. == Bug fixes: * Properly count pending examples. OSpec is released under the MIT license. Please see the README file in the distribution for more details and examples. Best regards, Andre