test/helpers/test_blogging.rb in nanoc-4.0.0b4 vs test/helpers/test_blogging.rb in nanoc-4.0.0rc1

- old
+ new

@@ -111,11 +111,11 @@ error = assert_raises(Nanoc::Int::Errors::GenericTrivial) do atom_feed end assert_equal( 'Cannot build Atom feed: no articles', - error.message + error.message, ) end end def test_atom_feed_without_base_url @@ -136,11 +136,11 @@ error = assert_raises(Nanoc::Int::Errors::GenericTrivial) do atom_feed end assert_equal( 'Cannot build Atom feed: site configuration has no base_url', - error.message + error.message, ) end end def test_atom_feed_without_title @@ -161,11 +161,11 @@ error = assert_raises(Nanoc::Int::Errors::GenericTrivial) do atom_feed end assert_equal( 'Cannot build Atom feed: no title in params, item or site config', - error.message + error.message, ) end end def test_atom_feed_without_author_name @@ -186,11 +186,11 @@ error = assert_raises(Nanoc::Int::Errors::GenericTrivial) do atom_feed end assert_equal( 'Cannot build Atom feed: no author_name in params, item or site config', - error.message + error.message, ) end end def test_atom_feed_with_author_name_and_uri_from_content_item @@ -219,25 +219,25 @@ # TODO: Use xpath matchers for more specific test result = atom_feed # Still should keep feed level author assert_match( /#{Regexp.escape('<name>Denis Defreyne</name>')}/, #' - result + result, ) assert_match( /#{Regexp.escape('<uri>http://stoneship.org/</uri>')}/, #' - result + result, ) # Overrides on specific items assert_match( /#{Regexp.escape('<name>Don Alias</name>')}/, #' - result + result, ) assert_match( /#{Regexp.escape('<uri>http://don.example.com/</uri>')}/, #' - result + result, ) end end def test_atom_feed_without_author_uri @@ -258,11 +258,11 @@ error = assert_raises(Nanoc::Int::Errors::GenericTrivial) do atom_feed end assert_equal( 'Cannot build Atom feed: no author_uri in params, item or site config', - error.message + error.message, ) end end def test_atom_feed_without_articles_created_at @@ -285,11 +285,11 @@ error = assert_raises(Nanoc::Int::Errors::GenericTrivial) do atom_feed end assert_equal( 'Cannot build Atom feed: one or more articles lack created_at', - error.message + error.message, ) end end def test_atom_feed_with_title_author_name_and_uri_as_params @@ -310,11 +310,11 @@ # Check atom_feed( author_name: 'Bob', author_uri: 'http://example.com/~bob/', - title: 'My Blog Or Something' + title: 'My Blog Or Something', ) end end def test_atom_feed_with_title_author_name_and_uri_from_config @@ -326,11 +326,11 @@ # Mock site @config = Nanoc::ConfigView.new({ author_name: 'Bob', author_uri: 'http://example.com/~bob/', title: 'My Blog Or Something', - base_url: 'http://example.com' + base_url: 'http://example.com', }) # Create feed item @item = mock @item.stubs(:[]).with(:title).returns(nil) @@ -388,15 +388,15 @@ # Check result = atom_feed limit: 1, articles: @items assert_match( Regexp.new('Article 0', Regexp::MULTILINE), - result + result, ) refute_match( Regexp.new('Article 1', Regexp::MULTILINE), - result + result, ) end end def test_atom_feed_sorting @@ -421,11 +421,11 @@ # Check result = atom_feed assert_match( Regexp.new('Article 1.*Article 0', Regexp::MULTILINE), - result + result, ) end end def test_atom_feed_preserve_order @@ -450,10 +450,10 @@ # Check result = atom_feed(preserve_order: true) assert_match( Regexp.new('Article 1.*Article 0', Regexp::MULTILINE), - result + result, ) end end def test_atom_feed_with_content_proc_param