Remove use of deprecated APIs

Also add a spec.
@atom/core is there a better way to avoid [this deprecation](https://github.com/atom/atom/blob/master/src/pane-view.coffee#L121)?