* [ANN] OSpec 0.2.0 - BDD for OCaml
@ 2009-04-19 18:17 Andre Nathan
0 siblings, 0 replies; only message in thread
From: Andre Nathan @ 2009-04-19 18:17 UTC (permalink / raw)
To: caml-list
Hello
I'm happy to announce a new version of OSpec, a Behavior-Driven Development
tool 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
== New features:
* Nested specifications: it is now possible to group related examples in a
nested "describe" block. For example,
describe "Person" do
describe "name" do
it "should not be empty" do
(String.length person.name) should be > 0
done;
it "should only contain valid characters" do
(person.name) should match_regexp "^[A-Za-z- ]+$"
done
done
done
* Property testing (inspired by QuickCheck): OSpec can now autogenerate
test cases with the "forall" keyword. For example,
describe "A list" do
it "should equal itself when reversed twice" do
forall list l . (List.rev (List.rev l)) should = l
done
done
This will generate lists of random length and test each one against the
specified property.
There are 28 predefined random sample generators for the basic OCaml
types which can be used directly in tests or as building blocks for
custom generators.
* Better error handling: exceptions in the specifications are now caught
and reported.
== Bug fixes:
* Properly count pending examples.
OSpec is released under the MIT license. Please see the README file in the
distribution for more details and examples.
Best regards,
Andre
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-04-19 18:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-19 18:17 [ANN] OSpec 0.2.0 - 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