Create 'tmp' dir for test_tags if it doesn't exist
Rather than use script/test to create the tmp directory, create it in a setup block for the appropriate context in the `TestTags` test.
This commit is contained in:
parent
334cc5a6ea
commit
d39d0cea19
|
@ -5,10 +5,6 @@ set -e
|
||||||
# script/test
|
# script/test
|
||||||
# script/test <test_file>
|
# script/test <test_file>
|
||||||
|
|
||||||
if [ ! -d tmp ]
|
|
||||||
then mkdir tmp
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -d test/dest ]
|
if [ -d test/dest ]
|
||||||
then rm -r test/dest
|
then rm -r test/dest
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -4,6 +4,10 @@ require 'helper'
|
||||||
|
|
||||||
class TestTags < JekyllUnitTest
|
class TestTags < JekyllUnitTest
|
||||||
|
|
||||||
|
def setup
|
||||||
|
FileUtils.mkdir_p("tmp")
|
||||||
|
end
|
||||||
|
|
||||||
def create_post(content, override = {}, converter_class = Jekyll::Converters::Markdown)
|
def create_post(content, override = {}, converter_class = Jekyll::Converters::Markdown)
|
||||||
site = fixture_site({"highlighter" => "rouge"}.merge(override))
|
site = fixture_site({"highlighter" => "rouge"}.merge(override))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue