Skip to content

Commit

Permalink
fix for #209, screenshot taken after after instead of before
Browse files Browse the repository at this point in the history
  • Loading branch information
lefthandedgoat committed Aug 18, 2015
1 parent f55bd4b commit 988e504
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/canopy/runner.fs
Original file line number Diff line number Diff line change
Expand Up @@ -89,23 +89,24 @@ let run () =
stopWatch.Start()

let runtest (suite : suite) (test : Test) =
if failed = false then
try
reporter.testStart test.Id
if System.Object.ReferenceEquals(test.Func, todo) then
reporter.todo ()
else if System.Object.ReferenceEquals(test.Func, skipped) then
reporter.skip ()
else
if failed = false then
reporter.testStart test.Id
if System.Object.ReferenceEquals(test.Func, todo) then
reporter.todo ()
else if System.Object.ReferenceEquals(test.Func, skipped) then
reporter.skip ()
else
try
try
suite.Before ()
test.Func ()
finally
suite.After ()
pass()
with
| ex when failureMessage <> null && failureMessage = ex.Message -> pass()
| ex -> fail ex test.Id <| safelyGetUrl()
with
| ex when failureMessage <> null && failureMessage = ex.Message -> pass()
| ex -> fail ex test.Id <| safelyGetUrl()
finally
suite.After ()
pass()

reporter.testEnd test.Id

failureMessage <- null
Expand Down

0 comments on commit 988e504

Please sign in to comment.