Permalink
Browse files

Merge remote branch 'jlecour/master'

Conflicts:
	lib/jekyll/page.rb
  • Loading branch information...
mojombo committed Nov 17, 2010
2 parents 8cc5370 + e9cf7b4 commit 4afee1bda1803b282deb087cb29d81ac966d250e
Showing with 22 additions and 5 deletions.
  1. +8 −0 test/source/.htaccess
  2. +14 −5 test/test_page.rb
View
@@ -0,0 +1,8 @@
+---
+layout: nil
+---
+ErrorDocument 404 /404.html
+ErrorDocument 500 /500.html
+{% for post in site.posts %}
+ # {{ post.url }}
+{% endfor %}
View
@@ -16,7 +16,7 @@ def do_render(page)
stub(Jekyll).configuration { Jekyll::DEFAULTS }
@site = Site.new(Jekyll.configuration)
end
-
+
context "processing pages" do
should "create url based on filename" do
@page = setup_page('contacts.html')
@@ -71,7 +71,7 @@ def do_render(page)
setup do
clear_dest
end
-
+
should "write properly" do
page = setup_page('contacts.html')
do_render(page)
@@ -83,14 +83,14 @@ def do_render(page)
should "write properly without html extension" do
page = setup_page('contacts.html')
- page.site.permalink_style = :pretty
+ page.site.permalink_style = :pretty
do_render(page)
page.write(dest_dir)
assert File.directory?(dest_dir)
assert File.exists?(File.join(dest_dir, 'contacts', 'index.html'))
end
-
+
should "write properly with extension different from html" do
page = setup_page("sitemap.xml")
page.site.permalink_style = :pretty
@@ -102,7 +102,16 @@ 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
+ end
end

0 comments on commit 4afee1b

Please sign in to comment.