mirror of
https://github.com/jekyll/jekyll.git
synced 2026-04-28 03:01:03 -04:00
Change default value of limit_posts from nil to 0 (see #1004)
Before this commit meaning of limit_posts: nil: no limit. generate all posts 0: raise error n ( > 0): generate n posts only n ( < 0): raise error else: raise error After this commit: nil: same as 0 0: no limit. generate all posts n ( > 0): generate n posts only n ( < 0): raise error else: almost same as 0 (depend on `to_i` result)
This commit is contained in:
@@ -58,11 +58,11 @@ class TestGeneratedSite < Test::Unit::TestCase
|
||||
assert_equal 5, @site.posts.size
|
||||
end
|
||||
|
||||
should "ensure limit posts is 1 or more" do
|
||||
should "ensure limit posts is 0 or more" do
|
||||
assert_raise ArgumentError do
|
||||
clear_dest
|
||||
stub(Jekyll).configuration do
|
||||
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'limit_posts' => 0})
|
||||
Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'limit_posts' => -1})
|
||||
end
|
||||
|
||||
@site = Site.new(Jekyll.configuration)
|
||||
|
||||
Reference in New Issue
Block a user