English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ANN] OSpec 0.1.0 - BDD for OCaml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-04-03 (02:48)
From: Andre Nathan <andre@d...>
Subject: [ANN] OSpec 0.1.0 - BDD for OCaml

I'm happy to announce the first public release of OSpec, an RSpec-inspired
Behavior-Driven Development library for OCaml using a Camlp4 syntax
extension. You can download this release from the ocamlcore forge at


or directly clone the repository from Github:


Here's a simple example of OSpec's syntax:

  describe "An even number" do
    it "should be divisible by two" do
      let divisible_by_two x = x mod 2 = 0 in
      42 should be divisible_by_two

    (* or simply: *)
    it "should be divisible by two" do
      (42 mod 2) should = 0

OSpec also supports before/after blocks, helper functions to aid in
specification writing, two different report formats and an extension
to the "match" syntax so tha you can use it in your expectations.
Please refer to the README file for details.

Best regards,