       tags = tagFinder.tagsNotClosedInFragment(fragment)
       expect(tags).toEqual(['html','body','h1'])
 
-  describe 'TagFinder#tagDoesNotCloseInFragment', ->
+  describe 'TagFinder::tagDoesNotCloseInFragment', ->
     it 'returns true if the given tag is not closed in the given fragment', ->
       fragment = "</other1></other2></html>"
       expect(tagFinder.tagDoesNotCloseInFragment("body", fragment)).toBe(true)

{ Point, Range, WorkspaceView } = require 'atom'
path = require('path')
TagFinder = require '../lib/tag-finder'
tagFinder = new TagFinder()

describe 'closeTag', ->
  describe 'TagFinder#parseFragment', ->
    fragment = ""

    beforeEach ->

      stack = tagFinder.parseFragment fragment, [], /<(body)|(notag)/, -> true
      expect(stack[stack.length-1]).toBe("body")

  describe 'TagFinder::tagsNotClosedInFragment', ->
    it 'returns the outermost tag not closed in an HTML fragment', ->
      fragment = "<html><head></head><body><h1><p></p>"
      tags = tagFinder.tagsNotClosedInFragment(fragment)
