 
     if currentBuffer?
       @currentEditorSubscriptions.add currentBuffer.onDidSave =>
-        @setCurrentAndCorrespondingFile(editor)
+        if @railsRSpecFinder.isSpec(editor.getBuffer().file.path)
+          @setCurrentAndCorrespondingFile(editor)
 
     if editor?
       @setCurrentAndCorrespondingFile(editor)

  initialize:  ->
    @currentState = new PluginState

    @currentState.onTreeBuilt (result) =>
      @setStdErrorNotification(result)
      @redrawTree(result.asTree, result)


PluginState = require './plugin-state'
RSpecTestDetails = require './rspec-test-details'
RailsRSpecFinder = require './rails-rspec-finder'

module.exports =
class RSpecTreeView extends View
