 
   describe "emoji", ->
     it "returns emoji it knows", ->
-      roaster Path.join(fixtures_dir, "emoji.md"), {isFile: true}, (err, contents) ->
+      callback = jasmine.createSpy()
+      roaster Path.join(fixtures_dir, "emoji.md"), {isFile: true}, callback
+
+      waitsFor ->
+        callback.callCount > 0
+
+      runs ->
+        [err, contents] = callback.mostRecentCall.args
+
         expect(err).toBeNull()
         expect(contents).toEqual '<p><img class="emoji" title=":trollface:" alt="trollface" src="/Users/garentorikian/Development/roaster/node_modules/emoji-images/pngs/trollface.png" height="20"></p>\n<p><img class="emoji" title=":shipit:" alt="shipit" src="/Users/garentorikian/Development/roaster/node_modules/emoji-images/pngs/shipit.png" height="20"></p>\n<p><img class="emoji" title=":smiley:" alt="smiley" src="/Users/garentorikian/Development/roaster/node_modules/emoji-images/pngs/smiley.png" height="20"></p>'
     it "can sanitize and return", ->
-      roaster Path.join(fixtures_dir, "emoji.md"), {isFile: true, sanitize:true}, (err, contents) ->
+      callback = jasmine.createSpy()
+      roaster Path.join(fixtures_dir, "emoji.md"), {isFile: true, sanitize:true}, callback
+
+      waitsFor ->
+        callback.callCount > 0
+
+      runs ->
+        [err, contents] = callback.mostRecentCall.args
+
         expect(err).toBeNull()
         expect(contents).toEqual '<p><img class="emoji" title=":trollface:" alt="trollface" src="/Users/garentorikian/Development/roaster/node_modules/emoji-images/pngs/trollface.png" height="20"></p>\n<p><img class="emoji" title=":shipit:" alt="shipit" src="/Users/garentorikian/Development/roaster/node_modules/emoji-images/pngs/shipit.png" height="20"></p>\n<p><img class="emoji" title=":smiley:" alt="smiley" src="/Users/garentorikian/Development/roaster/node_modules/emoji-images/pngs/smiley.png" height="20"></p>'
     it "does nothing to unknown emoji", ->

        expect(err).toBeNull()
        expect(contents).toEqual '<p>:lala:</p>\n'
    it "does not mess up coded emoji", ->
      roaster Path.join(fixtures_dir, "emoji_bad.md"), {isFile: true}, (err, contents) ->
        expect(err).toBeNull()
        expect(contents).toEqual '<pre><code class="lang-ruby">not :trollface:\n</code></pre>\n<p>wow <code>that is nice :smiley:</code></p>'

  # describe "headers", ->
  #   [toc, result, resultShort] = []


  describe "options", ->
    describe "passing options.isFile = true", ->
      it "returns a rendered file", ->
        callback = jasmine.createSpy()
        roaster Path.join(fixtures_dir, "markdown.md"), {isFile: true}, callback

        waitsFor ->
          callback.callCount > 0

        runs ->
          [err, contents] = callback.mostRecentCall.args
          expect(err).toBeNull()
          expect(contents).toContain '<code class="lang-bash">'
    describe "not passing options.isFile", ->
