Skip to content

Commit

Permalink
link to Stack Overflow answer re: Dir sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld committed Dec 19, 2013
1 parent 3c1d45f commit a6e1c40
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/test_site.rb
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def generate(site)

should "sort pages in a consistent way" do
# The order that files are returned differs across operating systems, so ensure that they're being sorted after the fact.
# http://stackoverflow.com/a/5529966/358804
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)
Expand Down

0 comments on commit a6e1c40

Please sign in to comment.