Skip to content

Instantly share code, notes, and snippets.

@chaliy
Created February 19, 2010 19:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chaliy/309058 to your computer and use it in GitHub Desktop.
Save chaliy/309058 to your computer and use it in GitHub Desktop.
module ``Calculator Div Operation Specification``
open FsSpec
open Example.Sut
module ``Describe simple divide opertion`` =
let ``divide two integers`` =
let res = Calc.Div 2 2
res.should_be_equal_to 1
let ``divide by zero (Unexpected Failure)`` =
let res = Calc.Div 2 0
res.should_be_equal_to 1
let ``do extended divide with two integers (Unmet Exepectations)`` =
let res = Calc.DivEx 2 2
res.should_be_equal_to 1
//--------------------------------------
//Calculator Div Operation Specification
//--------------------------------------
//
// Describe simple divide opertion
//
// -Should divide two integers - OK
// -Should divide by zero (Unexpected Failure) - Attempted to divide by zero.
// -Should do extended divide with two integers (Unmet Exepectations) - Failed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment