Skip to content

Commit

Permalink
Merge branch 'master' of github.com:forki/NaturalSpec
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Jul 31, 2012
2 parents c9d5e1a + 8b82f66 commit f77cc3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/app/NaturalSpec/Spec.fs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Scenario =
type Example = type Example =
class class
inherit TestCaseAttribute inherit TestCaseAttribute
new (testParams:obj[]) = { inherit TestCaseAttribute(testParams) } new ([<ParamArray>] testParams:obj[]) = { inherit TestCaseAttribute(testParams) }
new (given:obj,result:obj) = { inherit TestCaseAttribute(given,result) } new (given:obj,result:obj) = { inherit TestCaseAttribute(given,result) }
new (p1:obj,p2:obj,p3:obj) = { inherit TestCaseAttribute(p1,p2,p3) } new (p1:obj,p2:obj,p3:obj) = { inherit TestCaseAttribute(p1,p2,p3) }
new (parameter:obj) = { inherit TestCaseAttribute(parameter) } new (parameter:obj) = { inherit TestCaseAttribute(parameter) }
Expand Down
10 changes: 9 additions & 1 deletion src/test/Spec.NaturalSpec/SimpleTypes.fs
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -23,4 +23,12 @@ let ``3 + 0 should give 3``() =
let ``Dividing by zero should fail``() = let ``Dividing by zero should fail``() =
Given 10 Given 10
|> When dividing_by 0 |> When dividing_by 0
|> Verify |> Verify

[<Example(1, 2, 3, 6)>]
let ``1 + 2 + 3 should give 6``(x, y, z, expected) =
Given x
|> When adding y
|> When adding z
|> It should equal expected
|> Verify

0 comments on commit f77cc3b

Please sign in to comment.