                         if let template = TemplateRepository(directoryPath: directoryPath, templateExtension: "", encoding: encoding).templateFromString(templateString, 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: "", encoding: encoding).templateFromString(templateString, error: &error)
                             })
                         }
                         if let template = TemplateRepository(baseURL: NSURL.fileURLWithPath(directoryPath)!, templateExtension: "", encoding: encoding).templateFromString(templateString, 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: "", encoding: encoding).templateFromString(templateString, error: &error)
                             })
                         }

        var templateString: String? { return dictionary["template"] as String? }
        var templateName: String? { return dictionary["template_name"] as String? }
        var renderedValue: MustacheValue { return MustacheValue.ObjCValue(dictionary["data"]!).canonical() }
        var expectedRendering: String? { return dictionary["expected_rendering"] as String? }
        var expectedError: String? { return dictionary["expected_error"] as String? }
        
        var templates: [Template] {

                    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 []
