 			}
 		}
 	}
-}+}
+
+private extension SignalType {
+
+	func testTransform() -> Signal<Value, Error> {
+		return Signal { observer in
+			self.observe(observer.action)
+		}
+	}
+
+}

			}
		}

		describe("map") {
			it("should deallocate") {
				weak var signal: Signal<AnyObject, NoError>? = Signal { _ in nil }.map { $0 }

				expect(signal).to(beNil())
			}

			it("should deallocate even if it has an observer") {
				weak var signal: Signal<AnyObject, NoError>? = {
					let signal: Signal<AnyObject, NoError> = Signal { _ in nil }.map { $0 }
					signal.observe(Observer())
					return signal
				}()

			it("should deallocate even if it has an observer with retained disposable") {
				var disposable: Disposable? = nil
				weak var signal: Signal<AnyObject, NoError>? = {
					let signal: Signal<AnyObject, NoError> = Signal { _ in nil }.testTransform()
					disposable = signal.observe(Observer())
					return signal
				}()
