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:
Jeremy Lecour 2010-09-09 09:37:51 +02:00
parent 3fa9af17fa
commit 16c19ecd19
2 changed files with 17 additions and 0 deletions

8
test/source/.htaccess Normal file
View File

@ -0,0 +1,8 @@
---
layout: nil
---
ErrorDocument 404 /404.html
ErrorDocument 500 /500.html
{% for post in site.posts %}
# {{ post.url }}
{% endfor %}

View File

@ -92,6 +92,15 @@ class TestPage < Test::Unit::TestCase
assert File.directory?(dest_dir)
assert File.exists?(File.join(dest_dir,'sitemap.xml'))
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