Add a failing test for rendering dotfiles
The test uses a simple ".htaccess" file that needs to be rendered as any other page, like the sitemap.xml, …
This commit is contained in:
parent
3fa9af17fa
commit
16c19ecd19
|
@ -0,0 +1,8 @@
|
||||||
|
---
|
||||||
|
layout: nil
|
||||||
|
---
|
||||||
|
ErrorDocument 404 /404.html
|
||||||
|
ErrorDocument 500 /500.html
|
||||||
|
{% for post in site.posts %}
|
||||||
|
# {{ post.url }}
|
||||||
|
{% endfor %}
|
|
@ -92,6 +92,15 @@ class TestPage < Test::Unit::TestCase
|
||||||
assert File.directory?(dest_dir)
|
assert File.directory?(dest_dir)
|
||||||
assert File.exists?(File.join(dest_dir,'sitemap.xml'))
|
assert File.exists?(File.join(dest_dir,'sitemap.xml'))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should "write dotfiles properly" do
|
||||||
|
page = setup_page('.htaccess')
|
||||||
|
do_render(page)
|
||||||
|
page.write(dest_dir)
|
||||||
|
|
||||||
|
assert File.directory?(dest_dir)
|
||||||
|
assert File.exists?(File.join(dest_dir, '.htaccess'))
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue