Google 網路論壇不再支援新的 Usenet 貼文或訂閱項目,但過往內容仍可供查看。

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

瀏覽次數:4 次
跳到第一則未讀訊息

Andre Nathan

未讀,
2009年3月25日 下午5:14:002009/3/25
收件者: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 則新訊息