@@ -397,10 +397,11 @@ def to_s
397397 context "with top-level post categories" do
398398 let ( :overrides ) do
399399 {
400- "feed" => { "categories" => [ " news" ] } ,
400+ "feed" => { "categories" => %w( news jekyll ) } ,
401401 }
402402 end
403- let ( :news_feed ) { File . read ( dest_dir ( "feed/news.xml" ) ) }
403+ let ( :singular_category_feed ) { File . read ( dest_dir ( "feed/news.xml" ) ) }
404+ let ( :plural_categories_feed ) { File . read ( dest_dir ( "feed/jekyll.xml" ) ) }
404405
405406 it "outputs the primary feed" do
406407 expect ( contents ) . to match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html"
@@ -410,12 +411,13 @@ def to_s
410411 expect ( contents ) . to_not match "http://example.org/2016/02/09/a-draft.html"
411412 end
412413
413- it "outputs the category feed" do
414- expect ( news_feed ) . to match '<title type="html">My awesome site | News</title>'
415- expect ( news_feed ) . to match "http://example.org/news/2014/03/02/march-the-second.html"
416- expect ( news_feed ) . to match "http://example.org/news/2013/12/12/dec-the-second.html"
417- expect ( news_feed ) . to_not match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html"
418- expect ( news_feed ) . to_not match "http://example.org/2015/08/08/stuck-in-the-middle.html"
414+ it "outputs the category feeds" do
415+ expect ( singular_category_feed ) . to match '<title type="html">My awesome site | News</title>'
416+ expect ( singular_category_feed ) . to match "http://example.org/news/2014/03/02/march-the-second.html"
417+ expect ( singular_category_feed ) . to match "March the second!"
418+ expect ( plural_categories_feed ) . to match '<title type="html">My awesome site | News</title>'
419+ expect ( plural_categories_feed ) . to match "http://example.org/updates/jekyll/2014/03/04/march-the-fourth.html"
420+ expect ( plural_categories_feed ) . to match "March the fourth!"
419421 end
420422 end
421423
0 commit comments