Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] [ANN] OSpec - BDD for OCaml

4 views
Skip to first unread message

Andre Nathan

unread,
Mar 25, 2009, 5:14:00 PM3/25/09
to caml...@inria.fr
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

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

0 new messages