Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Andre Nathan <andre@d...>
Subject: [ANN] OSpec 0.1.0 - BDD for OCaml
Hello

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

  http://forge.ocamlcore.org/projects/ospec/

or directly clone the repository from Github:

  http://github.com/andrenth/ospec/tree/master


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
    done;

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

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,
Andre