 
 class TestDatabase<Writer: DatabaseWriter> {
     private let directoryURL: URL
-    let writer: Writer
+    private var writer: Writer!
     
     init(_ writer: (String) throws -> Writer) throws {
         directoryURL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(ProcessInfo.processInfo.globallyUniqueString, isDirectory: true)

        XCTAssertEqual(records.map({ $0.name }), ["Arthur", "Barbara"])
        
        try writer.write { db in
            try Person(id: nil, name: "Craig").insert(db)
            wait(for: [expectations[0]], timeout: 1)
            XCTAssertEqual(records.map({ $0.name }), ["Arthur", "Barbara", "Craig"])
            
            try Person.deleteAll(db)
            wait(for: [expectations[1]], timeout: 1)
            XCTAssertEqual(records.map({ $0.name }), [])
        }
    }
    
    func testRequestRxFetchAll() throws {
        let testQueue = try TestDatabase { try DatabaseQueue(path: $0) }
        try testRequestRxFetchAll(writer: testQueue.writer)
        
        let testPool = try TestDatabase { try DatabasePool(path: $0) }
        try testRequestRxFetchAll(writer: testPool.writer)
    }
}

    override func tearDown() {
        disposeBag = nil
    }
}

extension ReactiveRequestTests {
    func testSelectionInfoRxSelection() throws {
        try TestDatabase({ try DatabaseQueue(path: $0) }).test(with: testSelectionInfoRxSelection)
        try TestDatabase({ try DatabasePool(path: $0) }).test(with: testSelectionInfoRxSelection)
    }
    
    func testSelectionInfoRxSelection(writer: DatabaseWriter) throws {
        var selectionInfos: [SelectStatement.SelectionInfo] = []
        try writer.write { db in
            try db.create(table: "table1") { t in
                t.column("id", .integer).primaryKey()
