test/test_generated_site.rb in jekyll-1.0.0.rc1 vs test/test_generated_site.rb in jekyll-1.0.0

- old
+ new

@@ -12,11 +12,11 @@ @site.process @index = File.read(dest_dir('index.html')) end should "ensure post count is as expected" do - assert_equal 32, @site.posts.size + assert_equal 33, @site.posts.size end should "insert site.posts into the index" do assert @index.include?("#{@site.posts.size} Posts") end @@ -56,11 +56,22 @@ should "generate only the specified number of posts" do 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' => -1}) + end + + @site = Site.new(Jekyll.configuration) + end + end + + should "acceptable limit post is 0" do + assert_nothing_raised ArgumentError do clear_dest stub(Jekyll).configuration do Jekyll::Configuration::DEFAULTS.merge({'source' => source_dir, 'destination' => dest_dir, 'limit_posts' => 0}) end