                         if let template = TemplateRepository(directoryPath: directoryPath, templateExtension: templateExtension, encoding: encoding).templateNamed(templateName.stringByDeletingPathExtension, error: &error) {
                             templates.append(template)
                         } else {
-                            testError(error, replayOnFailure: {
+                            XCTAssertNotNil(error, "Expected parsing error in \(description)")
+                            testError(error!, replayOnFailure: {
                                 let template = TemplateRepository(directoryPath: directoryPath, templateExtension: templateExtension, encoding: encoding).templateNamed(templateName.stringByDeletingPathExtension, error: &error)
                             })
                         }
                         if let template = TemplateRepository(baseURL: NSURL.fileURLWithPath(directoryPath)!, templateExtension: templateExtension, encoding: encoding).templateNamed(templateName.stringByDeletingPathExtension, error: &error) {
                             templates.append(template)
                         } else {
-                            testError(error, replayOnFailure: {
+                            XCTAssertNotNil(error, "Expected parsing error in \(description)")
+                            testError(error!, replayOnFailure: {
                                 let template = TemplateRepository(baseURL: NSURL.fileURLWithPath(directoryPath)!, templateExtension: templateExtension, encoding: encoding).templateNamed(templateName.stringByDeletingPathExtension, error: &error)
                             })
                         }

        runTestsFromResource("sections.json", directory: "GRMustacheSuite")
//        runTestsFromResource("standard_library.json", directory: "GRMustacheSuite")
        runTestsFromResource("tag_parsing_errors.json", directory: "GRMustacheSuite")
//        runTestsFromResource("text_rendering.json", directory: "GRMustacheSuite")
        runTestsFromResource("variables.json", directory: "GRMustacheSuite")
    }
    

                    if let template = TemplateRepository().templateFromString(templateString, error: &error) {
                        return [template]
                    } else {
                        XCTAssertNotNil(error, "Expected parsing error in \(description)")
                        testError(error!, replayOnFailure: {
                            let template = TemplateRepository().templateFromString(templateString, error: &error)
                        })
                        return []
