title: XCTestCase optional instance variable
body: <p>Why is my optional instance variable nil when I infact set it to non-nil?</p>
  
  <p>Code:</p>
  
  <pre><code>class FooTests: XCTestCase {
      var foo: Int?
  
      func test_A_setFoo() {
          XCTAssertNil(foo)
          foo = 1
          XCTAssertNotNil(foo)
      }
  
      func test_B_fooIsNotNil() {
          XCTAssertNotNil(foo)
      }
  }
  </code></pre>
  
  <p><code>test_A_setFoo()</code>succeeds while <code>test_B_fooIsNotNil()</code> fails</p>