# Path: handroll/frontmatter.py
# class FrontmatterExtractor(FrontmatterComposerMixin):
#     """Extract frontmatter from a source file."""
# 
#     def extract(self, source_file):
#         data, source = self.get_data(source_file)
#         return data
# 
# Path: handroll/tests/testcase.py
# class TestCase(unittest.TestCase):
# 
#     def __init__(self, methodName='runTest'):
#         super(TestCase, self).__init__(methodName)
#         self.factory = Factory()


import inspect
import tempfile
from handroll.frontmatter import FrontmatterExtractor
from handroll.tests import TestCase



class TestFrontmatterExtractor(TestCase):

    def test_extracts(self):
        source = inspect.cleandoc("""%YAML 1.1
        ---
        title: "ØMQ: A dynamic book with surprises"
        ---
        The Content
        """)
        with tempfile.NamedTemporaryFile(delete=False) as f:
            f.write(source.encode('utf-8'))

# Path: handroll/frontmatter.py
# class FrontmatterExtractor(FrontmatterComposerMixin):
#     """Extract frontmatter from a source file."""
# 
#     def extract(self, source_file):
#         data, source = self.get_data(source_file)
#         return data
# 
# Path: handroll/tests/testcase.py
# class TestCase(unittest.TestCase):
# 
#     def __init__(self, methodName='runTest'):
#         super(TestCase, self).__init__(methodName)
#         self.factory = Factory()


# Path: handroll/tests/test_frontmatter.py
import inspect
import tempfile
from handroll.frontmatter import FrontmatterExtractor
from handroll.tests import TestCase




class TestFrontmatterExtractor(TestCase):

    def test_extracts(self):
        source = inspect.cleandoc("""%YAML 1.1
        ---
        title: "ØMQ: A dynamic book with surprises"
        ---
        The Content
        """)
        with tempfile.NamedTemporaryFile(delete=False) as f:
            f.write(source.encode('utf-8'))

        extractor = FrontmatterExtractor()