 path = require 'path'
 fs = require 'fs-plus'
-Registry = require '../lib/grammar-registry'
+GrammarRegistry = require '../lib/grammar-registry'
 
 describe "Grammar tokenization", ->
   [grammar, registry] = []

    registry.loadGrammarSync(path.join(__dirname, 'fixtures', name))

  beforeEach ->
    registry = new Registry()
    loadGrammarSync('text.json')
    loadGrammarSync('javascript.json')
    loadGrammarSync('javascript-regex.json')


  describe "when the registry is empty", ->
    it "tokenizes using the null grammar", ->
      emptyRegistry = new GrammarRegistry()
      grammar = emptyRegistry.selectGrammar('foo.js', '')
      {tokens} = grammar.tokenizeLine('a = 1;')
      expect(tokens.length).toBe 1
