anchor.diff:  let beExample = beExampleWithResult (fun _ -> true)
   let bePending = beExampleWithResult (fun r -> r = Pending)
   let beSuccess = beExampleWithResult (fun r -> r = Success)
  +let runExamples grp = grp |> run |> ignore
   
   let doRun grp =
       let reporter = TestReporter.instance
  
positive.code:                         Example ("test2", Success)
                          EndGroup
                          EndGroup ]
                      c |> getSubject
                      |> should (be.equalTo expected)
              ]
          ]
  
  
negative.code:             ]
          ]
          
          describe "metadata handling" [
              context "test contains metadata" [
                  before <| fun ctx ->
                      ctx?testFunc <- (fun (c:TestContext) -> ctx?answer <- c.metadata.Get<int> "answer")
  
                  it "passes the metadata to the test" <| fun ctx ->
                      anExampleGroup
                      |> withExamples [
                          anExampleWithCode ctx?testFunc
                          |> withExampleMetaData ("answer", 42) ]
                      |> runExamples
                      ctx?answer |> should (be.equalTo 42)
  
                  it "passes the metadata to the setup" <| fun c ->
                      anExampleGroup
                      |> withSetupCode c?testFunc
                      |> withAnExampleWithMetaData ("answer", 42)
                      |> runExamples
                      c?answer |> should (be.equalTo 42)
              ]
  
              context "example group contains metadata" [
                  before <| fun ctx ->
                      let withExampleMetaData =
                          match ctx.metadata?addExampleMetaData with
                          | false -> id
                          | true -> withExampleMetaData ("source", "example")
                      let withChildGroupMetaData =
                          match ctx.metadata?addChildGroupMetaData with
                          | false -> id
                          | true -> withMetaData ("source", "child group")
  
                      anExampleGroup
                      |> withMetaData ("source", "parent group")
                      |> withNestedGroup (
                          withChildGroupMetaData
                          >> withExamples [
                              anExampleWithCode (fun testCtx ->
                                  ctx.Set "source" (testCtx.metadata?source))
                              |> withExampleMetaData
                          ])
                      |> runExamples
  
                  ("addChildGroupMetaData" ++ false |||
                   "addExampleMetaData" ++ false) ==>
                  context "test contains no metadata" [
                      it "uses metadata from setup" <| fun ctx ->
                          ctx.Get "source" |> should (be.equalTo "parent group")
                  ]   
  
                  ("addChildGroupMetaData" ++ false |||
                   "addExampleMetaData" ++ true) ==>
                  context "test overrides same metadata" [
                      it "uses the metadata specified in test" <| fun ctx ->
                          ctx?source.Should (be.equalTo "example")
                  ]
  
                  ("addChildGroupMetaData" ++ true |||
                   "addExampleMetaData" ++ false) ==>
                  context "nested example group overrides metadata" [
                      it "uses the metadata from the child group" <| fun ctx ->
                          ctx?source.Should (be.equalTo "child group")
                  ]
              ]
          ]
  