diff --git a/spec/jekyll-feed_spec.rb b/spec/jekyll-feed_spec.rb index d153df4a..845c54f1 100644 --- a/spec/jekyll-feed_spec.rb +++ b/spec/jekyll-feed_spec.rb @@ -43,16 +43,16 @@ end it "puts all the posts in the feed.xml file" do - expect(contents).to match %r!http://example.org/updates/2014/03/04/march-the-fourth.html! - expect(contents).to match %r!http://example.org/news/2014/03/02/march-the-second.html! - expect(contents).to match %r!http://example.org/news/2013/12/12/dec-the-second.html! + expect(contents).to match %r!http://example\.org/updates/2014/03/04/march-the-fourth\.html! + expect(contents).to match %r!http://example\.org/news/2014/03/02/march-the-second\.html! + expect(contents).to match %r!http://example\.org/news/2013/12/12/dec-the-second\.html! expect(contents).to match "http://example.org/2015/08/08/stuck-in-the-middle.html" - expect(contents).to_not match %r!http://example.org/2016/02/09/a-draft.html! + expect(contents).to_not match %r!http://example\.org/2016/02/09/a-draft\.html! end it "does not include assets or any static files that aren't .html" do - expect(contents).not_to match %r!http://example.org/images/hubot.png! - expect(contents).not_to match %r!http://example.org/feeds/atom.xml! + expect(contents).not_to match %r!http://example\.org/images/hubot\.png! + expect(contents).not_to match %r!http://example\.org/feeds/atom\.xml! end it "preserves linebreaks in preformatted text in posts" do @@ -60,7 +60,7 @@ end it "supports post author name as an object" do - expect(contents).to match %r!\s*Ben\s*ben@example.com\s*http://ben.balter.com\s*! + expect(contents).to match %r!\s*Ben\s*ben@example\.com\s*http://ben\.balter.com\s*! end it "supports post author name as a string" do @@ -72,7 +72,7 @@ end it "does use author reference with data from _data/authors.yml" do - expect(contents).to match %r!\s*Garth\s*example@mail.com\s*http://garthdb.com\s*! + expect(contents).to match %r!\s*Garth\s*example@mail\.com\s*http://garthdb\.com\s*! end it "converts markdown posts to HTML" do @@ -84,7 +84,7 @@ end it "replaces newlines in posts to spaces" do - expect(contents).to match %r!The plugin will properly strip newlines.! + expect(contents).to match %r!The plugin will properly strip newlines\.! end it "renders Liquid inside posts" do @@ -159,7 +159,7 @@ end it "renders the feed meta" do - expected = %r!! + expected = %r!! expect(contents).to match(expected) end end @@ -239,9 +239,9 @@ end it "correctly adds the baseurl to the posts" do - expect(contents).to match %r!http://example.org/bass/updates/2014/03/04/march-the-fourth.html! - expect(contents).to match %r!http://example.org/bass/news/2014/03/02/march-the-second.html! - expect(contents).to match %r!http://example.org/bass/news/2013/12/12/dec-the-second.html! + expect(contents).to match %r!http://example\.org/bass/updates/2014/03/04/march-the-fourth\.html! + expect(contents).to match %r!http://example\.org/bass/news/2014/03/02/march-the-second\.html! + expect(contents).to match %r!http://example\.org/bass/news/2013/12/12/dec-the-second\.html! end it "renders the feed meta" do @@ -344,18 +344,18 @@ let(:news_feed) { File.read(dest_dir("feed/news.xml")) } it "outputs the primary feed" do - expect(contents).to match %r!http://example.org/updates/2014/03/04/march-the-fourth.html! - expect(contents).to match %r!http://example.org/news/2014/03/02/march-the-second.html! - expect(contents).to match %r!http://example.org/news/2013/12/12/dec-the-second.html! + expect(contents).to match %r!http://example\.org/updates/2014/03/04/march-the-fourth\.html! + expect(contents).to match %r!http://example\.org/news/2014/03/02/march-the-second\.html! + expect(contents).to match %r!http://example\.org/news/2013/12/12/dec-the-second\.html! expect(contents).to match "http://example.org/2015/08/08/stuck-in-the-middle.html" - expect(contents).to_not match %r!http://example.org/2016/02/09/a-draft.html! + expect(contents).to_not match %r!http://example\.org/2016/02/09/a-draft\.html! end it "outputs the category feed" do expect(news_feed).to match "My awesome site | News" - expect(news_feed).to match %r!http://example.org/news/2014/03/02/march-the-second.html! - expect(news_feed).to match %r!http://example.org/news/2013/12/12/dec-the-second.html! - expect(news_feed).to_not match %r!http://example.org/updates/2014/03/04/march-the-fourth.html! + expect(news_feed).to match %r!http://example\.org/news/2014/03/02/march-the-second\.html! + expect(news_feed).to match %r!http://example\.org/news/2013/12/12/dec-the-second\.html! + expect(news_feed).to_not match %r!http://example\.org/updates/2014/03/04/march-the-fourth\.html! expect(news_feed).to_not match "http://example.org/2015/08/08/stuck-in-the-middle.html" end end @@ -375,18 +375,18 @@ let(:news_feed) { File.read(dest_dir("feed/news.xml")) } it "outputs the primary feed" do - expect(contents).to match %r!http://example.org/updates/2014/03/04/march-the-fourth.html! - expect(contents).to match %r!http://example.org/news/2014/03/02/march-the-second.html! - expect(contents).to match %r!http://example.org/news/2013/12/12/dec-the-second.html! + expect(contents).to match %r!http://example\.org/updates/2014/03/04/march-the-fourth\.html! + expect(contents).to match %r!http://example\.org/news/2014/03/02/march-the-second\.html! + expect(contents).to match %r!http://example\.org/news/2013/12/12/dec-the-second\.html! expect(contents).to match "http://example.org/2015/08/08/stuck-in-the-middle.html" - expect(contents).to_not match %r!http://example.org/2016/02/09/a-draft.html! + expect(contents).to_not match %r!http://example\.org/2016/02/09/a-draft\.html! end it "outputs the category feed" do expect(news_feed).to match "My awesome site | News" - expect(news_feed).to match %r!http://example.org/news/2014/03/02/march-the-second.html! - expect(news_feed).to match %r!http://example.org/news/2013/12/12/dec-the-second.html! - expect(news_feed).to_not match %r!http://example.org/updates/2014/03/04/march-the-fourth.html! + expect(news_feed).to match %r!http://example\.org/news/2014/03/02/march-the-second\.html! + expect(news_feed).to match %r!http://example\.org/news/2013/12/12/dec-the-second\.html! + expect(news_feed).to_not match %r!http://example\.org/updates/2014/03/04/march-the-fourth\.html! expect(news_feed).to_not match "http://example.org/2015/08/08/stuck-in-the-middle.html" end end @@ -411,7 +411,7 @@ expect(collection_feed).to match "My awesome site | Collection" expect(collection_feed).to match "http://example.org/collection/2018-01-01-collection-doc.html" expect(collection_feed).to match "http://example.org/collection/2018-01-02-collection-category-doc.html" - expect(collection_feed).to_not match %r!http://example.org/updates/2014/03/04/march-the-fourth.html! + expect(collection_feed).to_not match %r!http://example\.org/updates/2014/03/04/march-the-fourth\.html! expect(collection_feed).to_not match "http://example.org/2015/08/08/stuck-in-the-middle.html" end end @@ -439,7 +439,7 @@ expect(news_feed).to match "My awesome site | Collection | News" expect(news_feed).to match "http://example.org/collection/2018-01-02-collection-category-doc.html" expect(news_feed).to_not match "http://example.org/collection/2018-01-01-collection-doc.html" - expect(news_feed).to_not match %r!http://example.org/updates/2014/03/04/march-the-fourth.html! + expect(news_feed).to_not match %r!http://example\.org/updates/2014/03/04/march-the-fourth\.html! expect(news_feed).to_not match "http://example.org/2015/08/08/stuck-in-the-middle.html" end end