Skip to content

Commit

Permalink
Fix #203 version 0.9.29
Browse files Browse the repository at this point in the history
  • Loading branch information
lefthandedgoat committed Jun 17, 2015
1 parent 489fde7 commit 37c4452
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
5 changes: 4 additions & 1 deletion RELEASE_NOTES.md
Expand Up @@ -150,4 +150,7 @@
* Updated to Selenium 2.46

#### 0.9.28 - June 16 2015
* Fix broken link to html reporter introduced in 0.9.27
* Fix broken link to html reporter introduced in 0.9.27

#### 0.9.29 - June 17 2015
* Fix issue 203, using canopy for unit tests [Issue #203](https://github.com/lefthandedgoat/canopy/issues/203)
6 changes: 3 additions & 3 deletions src/canopy/AssemblyInfo.fs
Expand Up @@ -4,9 +4,9 @@ open System.Reflection
[<assembly: AssemblyTitleAttribute("canopy")>]
[<assembly: AssemblyProductAttribute("canopy")>]
[<assembly: AssemblyDescriptionAttribute("F# web testing framework")>]
[<assembly: AssemblyVersionAttribute("0.9.28")>]
[<assembly: AssemblyFileVersionAttribute("0.9.28")>]
[<assembly: AssemblyVersionAttribute("0.9.29")>]
[<assembly: AssemblyFileVersionAttribute("0.9.29")>]
do ()

module internal AssemblyVersionInformation =
let [<Literal>] Version = "0.9.28"
let [<Literal>] Version = "0.9.29"
7 changes: 4 additions & 3 deletions src/canopy/runner.fs
Expand Up @@ -74,11 +74,12 @@ let fail (ex : Exception) id =
// Don't fail the runner itself, but report it.
reporter.write (sprintf "Error during fail reporting: %s" (failExc.ToString()))
reporter.fail ex id Array.empty
let safelyGetUrl () = if browser = null then "no browser = no url" else browser.Url

let failSuite (ex: Exception) (suite : suite) =
let reportFailedTest (ex: Exception) (test : Test) =
reporter.testStart test.Id
fail ex test.Id browser.Url
fail ex test.Id <| safelyGetUrl()
reporter.testEnd test.Id
suite.Tests |> List.iter (fun test -> reportFailedTest ex test)

Expand All @@ -104,7 +105,7 @@ let run () =
pass()
with
| ex when failureMessage <> null && failureMessage = ex.Message -> pass()
| ex -> fail ex test.Id browser.Url
| ex -> fail ex test.Id <| safelyGetUrl()
reporter.testEnd test.Id

failureMessage <- null
Expand Down Expand Up @@ -172,4 +173,4 @@ let runFor browsers =
once (fun _ -> switchTo browser)
suites <- suites @ currentSuites)
| _ -> raise <| Exception "I dont know what you have given me"
run ()

0 comments on commit 37c4452

Please sign in to comment.