 
 			it("should dispose of added disposables if disposed") {
 				let addedDisposable = SimpleDisposable()
-				var test: () -> () = { }
+				var disposable: Disposable!
 
 				let producer = SignalProducer<Int, NoError>() { _, disposable in
 					disposable.addDisposable(addedDisposable)
 					return
 				}
 
-				producer |> startWithSignal { _, disposable in
-					test = { _ in disposable.dispose() }
+				producer |> startWithSignal { _, innerDisposable in
+					disposable = innerDisposable
 				}
 
 				expect(addedDisposable.disposed).to(beFalsy())
 
-				test()
+				disposable.dispose()
 				expect(addedDisposable.disposed).to(beTruthy())
 			}
 


				expect(testSink).toNot(beNil())

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

			it("should dispose of added disposables upon completion") {
				let addedDisposable = SimpleDisposable()
				var test: () -> () = { }

				let producer = SignalProducer<(), NoError>() { observer, disposable in
					disposable.addDisposable(addedDisposable)
					test = { _ in sendCompleted(observer) }
				}

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

				test()
				expect(addedDisposable.disposed).to(beTruthy())
			}

			it("should dispose of added disposables upon error") {
				let addedDisposable = SimpleDisposable()
				var test: () -> () = { }

				let producer = SignalProducer<(), TestError>() { observer, disposable in
					disposable.addDisposable(addedDisposable)
					test = { _ in sendError(observer, .Default) }
				}

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

				test()
				expect(addedDisposable.disposed).to(beTruthy())
			}

			it("should dispose of added disposables upon interruption") {
				let addedDisposable = SimpleDisposable()
				var test: () -> () = { }

				let producer = SignalProducer<(), NoError>() { observer, disposable in
					disposable.addDisposable(addedDisposable)
					test = { _ in sendInterrupted(observer) }
				}

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

				test()
				expect(addedDisposable.disposed).to(beTruthy())
			}



			it("should release signal observers if disposed") {
				weak var testSink: TestSink?
				var disposable: Disposable!

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

					disposable = innerDisposable
				}

				expect(testSink).toNot(beNil())

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

