Merge pull request #5381 from pathawks/pr/rubocop
Merge pull request 5381
This commit is contained in:
		
						commit
						d8d42f6abc
					
				|  | @ -1,7 +1,7 @@ | ||||||
| #!/usr/bin/env ruby | #!/usr/bin/env ruby | ||||||
| STDOUT.sync = true | STDOUT.sync = true | ||||||
| 
 | 
 | ||||||
| $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), *%w(.. lib))) | $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib")) | ||||||
| 
 | 
 | ||||||
| require "jekyll" | require "jekyll" | ||||||
| require "mercenary" | require "mercenary" | ||||||
|  |  | ||||||
|  | @ -54,7 +54,7 @@ module Jekyll | ||||||
| 
 | 
 | ||||||
|     # Ensure the priority is a Fixnum |     # Ensure the priority is a Fixnum | ||||||
|     def self.priority_value(priority) |     def self.priority_value(priority) | ||||||
|       return priority if priority.is_a?(Fixnum) |       return priority if priority.is_a?(Integer) | ||||||
|       PRIORITY_MAP[priority] || DEFAULT_PRIORITY |       PRIORITY_MAP[priority] || DEFAULT_PRIORITY | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -13,8 +13,8 @@ class TestRelatedPosts < JekyllUnitTest | ||||||
|       last_post     = @site.posts.last |       last_post     = @site.posts.last | ||||||
|       related_posts = Jekyll::RelatedPosts.new(last_post).build |       related_posts = Jekyll::RelatedPosts.new(last_post).build | ||||||
| 
 | 
 | ||||||
|       last_10_recent_posts = (@site.posts.docs.reverse - [last_post]).first(10) |       last_ten_recent_posts = (@site.posts.docs.reverse - [last_post]).first(10) | ||||||
|       assert_equal last_10_recent_posts, related_posts |       assert_equal last_ten_recent_posts, related_posts | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue