caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [ANN] OSpec - BDD for OCaml
@ 2009-03-25 21:18 Andre Nathan
  0 siblings, 0 replies; only message in thread
From: Andre Nathan @ 2009-03-25 21:18 UTC (permalink / raw)
  To: caml-list

Hello

I would like to announce the availability of OSpec, an RSpec-inspired
Behavior-Driven Development library for OCaml using a Camlp4 syntax
extension. It is available at

  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

I must say that this is the first time I use Camlp4 (in fact I started
writing this to learn about it), so there are probably better ways to
accomplish the functionality that OSpec provides. The code is horrible
and it will make your eyes bleed. However, since there was a question
about the availability of such a library recently on the list, I decided
to make it public. Maybe I can get some contributions to this :)

Best regards,
Andre


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-25 21:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-25 21:18 [ANN] OSpec - BDD for OCaml Andre Nathan

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).