 # ]
 
 describe "Markdown grammar", ->
+  grammar = null
+
+  beforeEach ->
+    waitsForPromise ->
+      atom.packages.activatePackage('language-markdown')
+
+    runs ->
+      grammar = atom.grammars.grammarForScopeName('text.md')
+
+  # Test the grammar
+  it "parses the grammar", ->
+    expect(grammar).toBeDefined()
+    expect(grammar.scopeName).toBe "text.md"
+
+  it "tokenizes spaces", ->
+    {tokens} = grammar.tokenizeLine(" ")
+    expect(tokens[0]).toEqual value: " ", scopes: ["text.md"]
 
   for fixture in fixtures
 

      expect(tests.length > 0).toEqual(true)

    # Everything seems to be okay, let's run the tests
    # describe "Fixture: #{fixture}", ->
    describe fixture, ->
      grammar = null



        runs ->
          grammar = atom.grammars.grammarForScopeName('text.md')

      # Cycle through the tests we've created in ASS
      # and we need to do it in a closure apparently
