-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort pages by name by default #1848
Conversation
The order that files are returned differs across operating systems, so ensure that they're being sorted after the fact.
/cc @benbalter @XhmikosR |
Thanks @afeld for this. I totally like this since I was seeing different results on my Windows VM and the GitHub page as you already know :) |
@@ -154,6 +154,15 @@ def generate(site) | |||
assert_equal @site.generators.sort_by(&:class).map{|g|g.class.priority}, @site.generators.map{|g|g.class.priority} | |||
end | |||
|
|||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This information (link and comment) would probably be better for the commit message – would you mind removing them from the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is that these lines of code can move around, so the commit information as to why the line is there can be hard to track down. Would moving these comments within the code (vs. leaving them in the test) make it any better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As much as possible, the only comments should be TomDoc. Can this information not be either encoded in the should
string and/or in the Pull Request body? Ideally it wouldn't be needed to understand why the test is there.
Updated! |
Thanks so much, and sorry to be so negative on comments. This LGTM. @mattr-? |
👍 |
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