         expect(fs.existsSync(atom.config.configFilePath)).toBe true
         expect(CSON.readFileSync(atom.config.configFilePath)).toEqual {}
 
-    describe "when a schema is specified", ->
-      beforeEach ->
-        schema =
-          type: 'object'
-          properties:
-            bar:
-              type: 'string'
-              default: 'def'
-            int:
-              type: 'integer'
-              default: 12
-
-        atom.config.setSchema('foo', schema)
-
-      describe "when the config file contains values that do not adhere to the schema", ->
-        warnSpy = null
-        beforeEach ->
-          warnSpy = spyOn console, 'warn'
-          fs.writeFileSync atom.config.configFilePath, """
-            foo:
-              bar: 'baz'
-              int: 'bad value'
-          """
-          atom.config.loadUserConfig()
-
-        it "updates the only the settings that have values matching the schema", ->
-          expect(atom.config.get("foo.bar")).toBe 'baz'
-          expect(atom.config.get("foo.int")).toBe 12
-
-          expect(warnSpy).toHaveBeenCalled()
-          expect(warnSpy.mostRecentCall.args[0]).toContain "'foo.int' could not be set"
+    describe "when the config file contains values that do not adhere to the schema", ->
+      warnSpy = null
+      beforeEach ->
+        warnSpy = spyOn console, 'warn'
+        fs.writeFileSync atom.config.configFilePath, """
+          foo:
+            bar: 'baz'
+            int: 'bad value'
+        """
+        atom.config.loadUserConfig()
+
+      it "updates the only the settings that have values matching the schema", ->
+        expect(atom.config.get("foo.bar")).toBe 'baz'
+        expect(atom.config.get("foo.int")).toBe 12
+
+        expect(warnSpy).toHaveBeenCalled()
+        expect(warnSpy.mostRecentCall.args[0]).toContain "foo.int"
 
   describe ".observeUserConfig()", ->
     updatedHandler = null
 
     beforeEach ->
-      atom.config.setDefaults('foo', bar: 'def')
+      atom.config.setSchema 'foo',
+        type: 'object'
+        properties:
+          bar:
+            type: 'string'
+            default: 'def'
+          baz:
+            type: 'string'
+          scoped:
+            type: 'boolean'
+          int:
+            type: 'integer'
+            default: 12
+
       atom.config.configDirPath = dotAtomPath
       atom.config.configFilePath = path.join(atom.config.configDirPath, "atom.config.cson")
       expect(fs.existsSync(atom.config.configDirPath)).toBeFalsy()

      it "does not fire a change event for paths that did not change", ->
        atom.config.onDidChange 'foo.bar', noChangeSpy = jasmine.createSpy()

        fs.writeFileSync(atom.config.configFilePath, "foo: { bar: 'baz', omg: 'ok'}")
        waitsFor 'update event', -> updatedHandler.callCount > 0
        runs ->
          expect(noChangeSpy).not.toHaveBeenCalled()
          expect(atom.config.get('foo.bar')).toBe 'baz'
          expect(atom.config.get('foo.omg')).toBe 'ok'

      describe 'when the default value is a complex value', ->
        beforeEach ->
          fs.writeFileSync(atom.config.configFilePath, "foo: { bar: ['baz', 'ok']}")
          waitsFor 'update event', -> updatedHandler.callCount > 0
          runs -> updatedHandler.reset()

      atom.config.configDirPath = dotAtomPath
      atom.config.configFilePath = path.join(atom.config.configDirPath, "atom.config.cson")
      expect(fs.existsSync(atom.config.configDirPath)).toBeFalsy()
      atom.config.setSchema 'foo',
        type: 'object'
        properties:
          bar:
            type: 'string'
            default: 'def'
          int:
            type: 'integer'
            default: 12

    afterEach ->
      fs.removeSync(dotAtomPath)
