Syntax is inspired by RSpec, so specification looks like:
do describe "Calculator" [ it "should add two integers" (fun unit -> let res = Calc.Add 2 2 res.should_be_equal_to 4 ); it "should devide two integers" (fun unit -> let res = Calc.Div 2 2 res.should_be_equal_to 1 ); ]
Looks pretty well, isn’t it? Unfortunately, I have number of problems that I have to solve to make this stuff usable. First of all is shared initialization of the specifications. Now you can do this just before specification (describe statement) but this looks bit ugly. Second are assertions. Now they are implemented as extension methods and look less readable than RSpec’s assertions.
Well, it about 46 lines of code… Not too much to discuss. Better to visit repository on GitHub.
This entry was posted on 2009-12-22T22:25:00+00:00. Permalink