Merge remote-tracking branch 'upstream/master' into sort-attributes

This commit is contained in:
Aidan Feldman
2013-12-22 19:31:56 -05:00
4 changed files with 12 additions and 1 deletions

View File

@@ -154,6 +154,13 @@ class TestSite < Test::Unit::TestCase
assert_equal @site.generators.sort_by(&:class).map{|g|g.class.priority}, @site.generators.map{|g|g.class.priority}
end
should "sort pages alphabetically" do
stub.proxy(Dir).entries { |entries| entries.reverse }
@site.process
sorted_pages = %w(.htaccess about.html bar.html contacts.html deal.with.dots.html foo.md index.html index.html sitemap.xml symlinked-file)
assert_equal sorted_pages, @site.pages.map(&:name)
end
should "read layouts" do
@site.read_layouts
assert_equal ["default", "simple", "post/simple"].sort, @site.layouts.keys.sort