spec/feedjira/parser/rss_entry_spec.rb in feedjira-3.1.1 vs spec/feedjira/parser/rss_entry_spec.rb in feedjira-3.1.2

- old
+ new

@@ -1,5 +1,7 @@ +# frozen_string_literal: true + require "spec_helper" describe Feedjira::Parser::RSSEntry do before(:each) do # I don't really like doing it this way because these unit test should only @@ -33,21 +35,21 @@ it "should parse the content" do expect(@entry.content).to eq sample_rss_entry_content end it "should provide a summary" do - summary = "Oops! When I released nokogiri version 1.0.7, I totally forgot to talk about Nokogiri::Slop() feature that was added. Why is it called \"slop\"? It lets you sloppily explore documents. Basically, it decorates your document with method_missing() that allows you to search your document via method calls.\nGiven this document:\n\ndoc = Nokogiri::Slop(<<-eohtml)\n<html>\n  <body>\n  [...]" # rubocop:disable Metrics/LineLength + summary = "Oops! When I released nokogiri version 1.0.7, I totally forgot to talk about Nokogiri::Slop() feature that was added. Why is it called \"slop\"? It lets you sloppily explore documents. Basically, it decorates your document with method_missing() that allows you to search your document via method calls.\nGiven this document:\n\ndoc = Nokogiri::Slop(<<-eohtml)\n<html>\n  <body>\n  [...]" expect(@entry.summary).to eq summary end it "should parse the published date" do published = Time.parse_safely "Thu Dec 04 17:17:49 UTC 2008" expect(@entry.published).to eq published end it "should parse the categories" do - expect(@entry.categories).to eq %w(computadora nokogiri rails) + expect(@entry.categories).to eq %w[computadora nokogiri rails] end it "should parse the guid as id" do expect(@entry.id).to eq "http://tenderlovemaking.com/?p=198" end @@ -64,20 +66,20 @@ title_value = value if field == "title" end expect(title_value).to eq "Nokogiri’s Slop Feature" - expected_fields = %w( + expected_fields = %w[ author categories comment_rss content entry_id published summary title url - ) + ] expect(all_fields.sort).to eq expected_fields end it "should support checking if a field exists in the entry" do expect(@entry).to include "title"