Remove use of deprecated APIs

Also, add a spec.
I would think a spy on `atom.workspace.open` and asserting it wasn't called would do the trick in that case.