caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Andre Nathan <andre@digirati.com.br>
To: caml-list@inria.fr
Subject: [ANN] OSpec 0.2.0 - BDD for OCaml
Date: Sun, 19 Apr 2009 15:17:36 -0300	[thread overview]
Message-ID: <1240165056.6223.16.camel@homesick> (raw)

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


                 reply	other threads:[~2009-04-19 18:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1240165056.6223.16.camel@homesick \
    --to=andre@digirati.com.br \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).