Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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, …
  • Loading branch information...
commit 16c19ecd190b7cb26e4a4e4f97c204f300a3ce65 1 parent 3fa9af1
@jlecour jlecour authored
Showing with 17 additions and 0 deletions.
  1. +8 −0 test/source/.htaccess
  2. +9 −0 test/test_page.rb
View
8 test/source/.htaccess
@@ -0,0 +1,8 @@
+---
+layout: nil
+---
+ErrorDocument 404 /404.html
+ErrorDocument 500 /500.html
+{% for post in site.posts %}
+ # {{ post.url }}
+{% endfor %}
View
9 test/test_page.rb
@@ -92,6 +92,15 @@ def do_render(page)
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
Please sign in to comment.
Something went wrong with that request. Please try again.