 
     afterEach ->
       config.unobserveUserConfig()
-      fsUtils.remove('/tmp/dot-atom-dir') if fsUtils.exists('/tmp/dot-atom-dir')
+      fs.remove('/tmp/dot-atom-dir') if fs.exists('/tmp/dot-atom-dir')
 
     describe "when the config file changes to contain valid cson", ->
       it "updates the config data", ->
-        fsUtils.writeSync(config.configFilePath, "foo: { bar: 'quux', baz: 'bar'}")
+        fs.writeSync(config.configFilePath, "foo: { bar: 'quux', baz: 'bar'}")
         waitsFor 'update event', -> updatedHandler.callCount > 0
         runs ->
           expect(config.get('foo.bar')).toBe 'quux'

    describe "when the config file changes to contain invalid cson", ->
      beforeEach ->
        spyOn(console, 'error')
        fsUtils.writeSync(config.configFilePath, "}}}")
        waitsFor "error to be logged", -> console.error.callCount > 0

      it "logs a warning and does not update config data", ->

        waitsFor -> initializationDone

        runs ->
          expect(fs.exists(config.configDirPath)).toBeTruthy()
          expect(fs.exists(path.join(config.configDirPath, 'packages'))).toBeTruthy()
          expect(fs.exists(path.join(config.configDirPath, 'snippets'))).toBeTruthy()
          expect(fs.exists(path.join(config.configDirPath, 'themes'))).toBeTruthy()
          expect(fs.isFileSync(path.join(config.configDirPath, 'config.cson'))).toBeTruthy()

  describe ".loadUserConfig()", ->
    beforeEach ->
      config.configDirPath = '/tmp/dot-atom-dir'
      config.configFilePath = path.join(config.configDirPath, "config.cson")
      expect(fs.exists(config.configDirPath)).toBeFalsy()

    afterEach ->
      fs.remove('/tmp/dot-atom-dir') if fs.exists('/tmp/dot-atom-dir')

    describe "when the config file contains valid cson", ->
      beforeEach ->
        fs.writeSync(config.configFilePath, "foo: bar: 'baz'")
        config.loadUserConfig()

      it "updates the config data based on the file contents", ->
