Remove use of deprecated APIs

Also, add a spec.
Yeah, I'm still a :-1:  on a short timeout, seems like it could be flaky on CI, how about waiting for a editor to be opened using `atom.workspace.getActiveTextEditor`, I feel like that is what most other specs do.