 RootView = require 'root-view'
-fs = require 'fs-utils'
+fsUtils = require 'fs-utils'
 
 describe "Whitespace", ->
   [editor, path] = []
 
   beforeEach ->
     path = "/tmp/atom-whitespace.txt"
-    fs.write(path, "")
+    fsUtils.write(path, "")
     window.rootView = new RootView
     rootView.open(path)
 

      editor.insertText "no trailing newline"
      editor.getBuffer().save()
      expect(editor.getText()).toBe "no trailing newline"


    editor = rootView.getActiveView()

  afterEach ->
    fsUtils.remove(path) if fsUtils.exists(path)

  it "strips trailing whitespace before an editor saves a buffer", ->
    spyOn(fsUtils, 'write')

    config.set("whitespace.ensureSingleTrailingNewline", false)
    config.update()
