         preview.onDidChangeMarkdown(listener = jasmine.createSpy('didChangeMarkdownListener'))
 
         runs ->
-          preview.file.writeSync "Hey!"
+          fs.writeFileSync(preview.getPath(), "Hey!")
 
         waitsFor "::onDidChangeMarkdown handler to be called", ->
           listener.callCount > 0

          preview.onDidChangeTitle(titleChangedCallback)
          fs.renameSync(preview.getPath(), path.join(path.dirname(preview.getPath()), 'file2.md'))

        waitsFor ->
          preview.getTitle() is "file2.md Preview"

        runs ->

        spyOn(preview, 'showLoading')

        runs ->
          fs.writeFileSync(preview.getPath(), "Hey!")

        waitsFor "contents to update", ->
          preview.text().indexOf("Hey!") >= 0

        runs ->
