Tests: factor out common code from complete/find_definition tests.
Tests: factor out common code from complete/find_definition tests.

Also formats code more consistently.

birkenfeld/racer,phildawes/racer,pmarcelll/racer,alkama/racer,racer-rust/racer