'The ``version-prompt`` directive replaces the placemarker
``|latest-installable|`` in a source file with the current
installable version in the output file.'

def test_version_prompt(self):

    source_directory = self.make_temporary_directory()
    source_file = source_directory.child('contents.rst')
    source_file.setContent(dedent('\n                                                ..    version-prompt::    bash    $\n\n                                                            $    PRE-|latest-installable|-POST\n                                                '))
    destination_directory = self.make_temporary_directory()
    run_process(['sphinx-build', '-b', 'html', '-C', '-D', 'extensions=flocker.docs.version_extensions', source_directory.path, destination_directory.path, source_file.path])
    expected = 'PRE-{}-POST'.format(get_installable_version(version))
    content = destination_directory.child('contents.html').getContent()
    self.assertIn(expected, content)
