Use connection factory in specs.