 
 			it("should dispose of added disposables upon completion") {
 				let addedDisposable = SimpleDisposable()
-				var test: () -> () = { }
+				var sink: Signal<Int, TestError>.Observer!
 
 				let producer = SignalProducer<Int, TestError>() { observer, disposable in
 					disposable.addDisposable(addedDisposable)
-					test = { _ in sendCompleted(observer) }
+					sink = observer
 				}
 
 				producer |> startWithSignal { _ in }
 				expect(addedDisposable.disposed).to(beFalsy())
 
-				test()
+				sendCompleted(sink)
 				expect(addedDisposable.disposed).to(beTruthy())
 			}
 
 			it("should dispose of added disposables upon error") {
 				let addedDisposable = SimpleDisposable()
-				var test: () -> () = { }
+				var sink: Signal<Int, TestError>.Observer!
 
 				let producer = SignalProducer<Int, TestError>() { observer, disposable in
 					disposable.addDisposable(addedDisposable)
-					test = { _ in sendError(observer, .Default) }
+					sink = observer
 				}
 
 				producer |> startWithSignal { _ in }
 				expect(addedDisposable.disposed).to(beFalsy())
 
-				test()
+				sendError(sink, .Default)
 				expect(addedDisposable.disposed).to(beTruthy())
 			}
 		}


			it("should release signal observers if disposed") {
				weak var testSink: TestSink?
				var dispose: () -> () = {}

				let producer = SignalProducer<Int, NoError>.never
				producer.startWithSignal { signal, disposable in
					var sink = TestSink()
					testSink = sink
					signal.observe(sink)

					dispose = { _ in disposable.dispose() }
				}

				expect(testSink).toNot(beNil())
				dispose()

				expect(testSink).to(beNil())
			}



			it("should dispose of added disposables if disposed") {
				let addedDisposable = SimpleDisposable()
				var disposable: Disposable!

				let producer = SignalProducer<Int, NoError>() { _, disposable in
					disposable.addDisposable(addedDisposable)
					return
				}

				producer |> startWithSignal { _, innerDisposable in
					disposable = innerDisposable
				}

				expect(addedDisposable.disposed).to(beFalsy())

				disposable.dispose()
				expect(addedDisposable.disposed).to(beTruthy())
			}

