feedjira 1.3.1 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,56 +8,56 @@ describe Feedjira::Parser::ITunesRSSItem do
8
8
  end
9
9
 
10
10
  it "should parse the title" do
11
- @item.title.should == "Shake Shake Shake Your Spices"
11
+ expect(@item.title).to eq "Shake Shake Shake Your Spices"
12
12
  end
13
13
 
14
14
  it "should parse the author" do
15
- @item.itunes_author.should == "John Doe"
15
+ expect(@item.itunes_author).to eq "John Doe"
16
16
  end
17
17
 
18
18
  it "should parse the subtitle" do
19
- @item.itunes_subtitle.should == "A short primer on table spices"
19
+ expect(@item.itunes_subtitle).to eq "A short primer on table spices"
20
20
  end
21
21
 
22
22
  it "should parse the summary" do
23
- @item.itunes_summary.should == "This week we talk about salt and pepper shakers, comparing and contrasting pour rates, construction materials, and overall aesthetics. Come and join the party!"
23
+ expect(@item.itunes_summary).to eq "This week we talk about salt and pepper shakers, comparing and contrasting pour rates, construction materials, and overall aesthetics. Come and join the party!"
24
24
  end
25
25
 
26
26
  it "should parse the enclosure" do
27
- @item.enclosure_length.should == "8727310"
28
- @item.enclosure_type.should == "audio/x-m4a"
29
- @item.enclosure_url.should == "http://example.com/podcasts/everything/AllAboutEverythingEpisode3.m4a"
27
+ expect(@item.enclosure_length).to eq "8727310"
28
+ expect(@item.enclosure_type).to eq "audio/x-m4a"
29
+ expect(@item.enclosure_url).to eq "http://example.com/podcasts/everything/AllAboutEverythingEpisode3.m4a"
30
30
  end
31
31
 
32
32
  it "should parse the guid as id" do
33
- @item.id.should == "http://example.com/podcasts/archive/aae20050615.m4a"
33
+ expect(@item.id).to eq "http://example.com/podcasts/archive/aae20050615.m4a"
34
34
  end
35
35
 
36
36
  it "should parse the published date" do
37
- @item.published.should == Time.parse_safely("Wed Jun 15 19:00:00 UTC 2005")
37
+ expect(@item.published).to eq Time.parse_safely("Wed Jun 15 19:00:00 UTC 2005")
38
38
  end
39
39
 
40
40
  it "should parse the duration" do
41
- @item.itunes_duration.should == "7:04"
41
+ expect(@item.itunes_duration).to eq "7:04"
42
42
  end
43
43
 
44
44
  it "should parse the keywords" do
45
- @item.itunes_keywords.should == "salt, pepper, shaker, exciting"
45
+ expect(@item.itunes_keywords).to eq "salt, pepper, shaker, exciting"
46
46
  end
47
47
 
48
48
  it "should parse the image" do
49
- @item.itunes_image.should == "http://example.com/podcasts/everything/AllAboutEverything.jpg"
49
+ expect(@item.itunes_image).to eq "http://example.com/podcasts/everything/AllAboutEverything.jpg"
50
50
  end
51
51
 
52
52
  it "should parse the order" do
53
- @item.itunes_order.should eq '12'
53
+ expect(@item.itunes_order).to eq '12'
54
54
  end
55
55
 
56
56
  it "should parse the closed captioned flag" do
57
- @item.itunes_closed_captioned.should eq 'yes'
57
+ expect(@item.itunes_closed_captioned).to eq 'yes'
58
58
  end
59
59
 
60
60
  it "should parse the encoded content" do
61
- @item.content.should == "<p><strong>TOPIC</strong>: Gooseneck Options</p>"
61
+ expect(@item.content).to eq "<p><strong>TOPIC</strong>: Gooseneck Options</p>"
62
62
  end
63
63
  end
@@ -8,11 +8,11 @@ describe Feedjira::Parser::ITunesRSSOwner do
8
8
  end
9
9
 
10
10
  it "should parse the name" do
11
- @owner.name.should == "John Doe"
11
+ expect(@owner.name).to eq "John Doe"
12
12
  end
13
13
 
14
14
  it "should parse the email" do
15
- @owner.email.should == "john.doe@example.com"
15
+ expect(@owner.email).to eq "john.doe@example.com"
16
16
  end
17
17
 
18
18
  end
@@ -3,19 +3,19 @@ require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])
3
3
  describe Feedjira::Parser::ITunesRSS do
4
4
  describe "#will_parse?" do
5
5
  it "should return true for an itunes RSS feed" do
6
- Feedjira::Parser::ITunesRSS.should be_able_to_parse(sample_itunes_feed)
6
+ expect(Feedjira::Parser::ITunesRSS).to be_able_to_parse(sample_itunes_feed)
7
7
  end
8
8
 
9
9
  it "should return true for an itunes RSS feed with spaces between attribute names, equals sign, and values" do
10
- Feedjira::Parser::ITunesRSS.should be_able_to_parse(sample_itunes_feed_with_spaces)
10
+ expect(Feedjira::Parser::ITunesRSS).to be_able_to_parse(sample_itunes_feed_with_spaces)
11
11
  end
12
12
 
13
13
  it "should return fase for an atom feed" do
14
- Feedjira::Parser::ITunesRSS.should_not be_able_to_parse(sample_atom_feed)
14
+ expect(Feedjira::Parser::ITunesRSS).to_not be_able_to_parse(sample_atom_feed)
15
15
  end
16
16
 
17
17
  it "should return false for an rss feedburner feed" do
18
- Feedjira::Parser::ITunesRSS.should_not be_able_to_parse(sample_rss_feed_burner_feed)
18
+ expect(Feedjira::Parser::ITunesRSS).to_not be_able_to_parse(sample_rss_feed_burner_feed)
19
19
  end
20
20
  end
21
21
 
@@ -25,38 +25,38 @@ describe Feedjira::Parser::ITunesRSS do
25
25
  end
26
26
 
27
27
  it "should parse the subtitle" do
28
- @feed.itunes_subtitle.should == "A show about everything"
28
+ expect(@feed.itunes_subtitle).to eq "A show about everything"
29
29
  end
30
30
 
31
31
  it "should parse the author" do
32
- @feed.itunes_author.should == "John Doe"
32
+ expect(@feed.itunes_author).to eq "John Doe"
33
33
  end
34
34
 
35
35
  it "should parse an owner" do
36
- @feed.itunes_owners.size.should == 1
36
+ expect(@feed.itunes_owners.size).to eq 1
37
37
  end
38
38
 
39
39
  it "should parse an image" do
40
- @feed.itunes_image.should == "http://example.com/podcasts/everything/AllAboutEverything.jpg"
40
+ expect(@feed.itunes_image).to eq "http://example.com/podcasts/everything/AllAboutEverything.jpg"
41
41
  end
42
42
 
43
43
  it "should parse categories" do
44
- @feed.itunes_categories.size == 3
45
- @feed.itunes_categories[0] == "Technology"
46
- @feed.itunes_categories[1] == "Gadgets"
47
- @feed.itunes_categories[2] == "TV &amp; Film"
44
+ expect(@feed.itunes_categories.size).to eq 3
45
+ expect(@feed.itunes_categories[0]).to eq "Technology"
46
+ expect(@feed.itunes_categories[1]).to eq "Gadgets"
47
+ expect(@feed.itunes_categories[2]).to eq "TV & Film"
48
48
  end
49
49
 
50
50
  it "should parse the summary" do
51
- @feed.itunes_summary.should == "All About Everything is a show about everything. Each week we dive into any subject known to man and talk about it as much as we can. Look for our Podcast in the iTunes Music Store"
51
+ expect(@feed.itunes_summary).to eq "All About Everything is a show about everything. Each week we dive into any subject known to man and talk about it as much as we can. Look for our Podcast in the iTunes Music Store"
52
52
  end
53
53
 
54
54
  it "should parse entries" do
55
- @feed.entries.size.should == 3
55
+ expect(@feed.entries.size).to eq 3
56
56
  end
57
57
 
58
58
  it "should parse the new-feed-url" do
59
- @feed.itunes_new_feed_url.should == "http://example.com/new.xml"
59
+ expect(@feed.itunes_new_feed_url).to eq "http://example.com/new.xml"
60
60
  end
61
61
  end
62
62
  end
@@ -6,6 +6,7 @@ describe Feedjira::Parser::RSSEntry do
6
6
  # I don't really like doing it this way because these unit test should only rely on RSSEntry,
7
7
  # but this is actually how it should work. You would never just pass entry xml straight to the AtomEnry
8
8
  @entry = Feedjira::Parser::RSS.parse(sample_rss_feed).entries.first
9
+ Feedjira::Feed.add_common_feed_entry_element("wfw:commentRss", :as => :comment_rss)
9
10
  end
10
11
 
11
12
  after(:each) do
@@ -16,70 +17,64 @@ describe Feedjira::Parser::RSSEntry do
16
17
  end
17
18
 
18
19
  it "should parse the title" do
19
- @entry.title.should == "Nokogiri’s Slop Feature"
20
+ expect(@entry.title).to eq "Nokogiri’s Slop Feature"
20
21
  end
21
22
 
22
23
  it "should parse the url" do
23
- @entry.url.should == "http://tenderlovemaking.com/2008/12/04/nokogiris-slop-feature/"
24
+ expect(@entry.url).to eq "http://tenderlovemaking.com/2008/12/04/nokogiris-slop-feature/"
24
25
  end
25
26
 
26
27
  it "should parse the author" do
27
- @entry.author.should == "Aaron Patterson"
28
+ expect(@entry.author).to eq "Aaron Patterson"
28
29
  end
29
30
 
30
31
  it "should parse the content" do
31
- @entry.content.should == sample_rss_entry_content
32
+ expect(@entry.content).to eq sample_rss_entry_content
32
33
  end
33
34
 
34
35
  it "should provide a summary" do
35
- @entry.summary.should == "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&#40;&#60;&#60;-eohtml&#41;\n&#60;html&#62;\n&#160; &#60;body&#62;\n&#160; [...]"
36
+ expect(@entry.summary).to eq "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&#40;&#60;&#60;-eohtml&#41;\n&#60;html&#62;\n&#160; &#60;body&#62;\n&#160; [...]"
36
37
  end
37
38
 
38
39
  it "should parse the published date" do
39
- @entry.published.should == Time.parse_safely("Thu Dec 04 17:17:49 UTC 2008")
40
+ expect(@entry.published).to eq Time.parse_safely("Thu Dec 04 17:17:49 UTC 2008")
40
41
  end
41
42
 
42
43
  it "should parse the categories" do
43
- @entry.categories.should == ['computadora', 'nokogiri', 'rails']
44
+ expect(@entry.categories).to eq ['computadora', 'nokogiri', 'rails']
44
45
  end
45
46
 
46
47
  it "should parse the guid as id" do
47
- @entry.id.should == "http://tenderlovemaking.com/?p=198"
48
+ expect(@entry.id).to eq "http://tenderlovemaking.com/?p=198"
48
49
  end
49
50
 
50
51
  it "should support each" do
51
- @entry.respond_to? :each
52
+ expect(@entry).to respond_to :each
52
53
  end
53
54
 
54
55
  it "should be able to list out all fields with each" do
55
56
  all_fields = []
56
- @entry.each do |field, value|
57
- all_fields << field
58
- end
59
- all_fields.sort == ['author', 'categories', 'content', 'id', 'published', 'summary', 'title', 'url']
60
- end
61
-
62
- it "should be able to list out all values with each" do
63
57
  title_value = ''
64
58
  @entry.each do |field, value|
59
+ all_fields << field
65
60
  title_value = value if field == 'title'
66
61
  end
67
- title_value.should == "Nokogiri’s Slop Feature"
62
+ expect(all_fields.sort).to eq ["author", "categories", "comment_rss", "content", "entry_id", "published", "summary", "title", "url"]
63
+ expect(title_value).to eq "Nokogiri’s Slop Feature"
68
64
  end
69
65
 
70
66
  it "should support checking if a field exists in the entry" do
71
- @entry.include?('title') && @entry.include?('author')
67
+ expect(@entry).to include 'title'
68
+ expect(@entry).to include 'author'
72
69
  end
73
70
 
74
71
  it "should allow access to fields with hash syntax" do
75
- @entry['title'] == @entry.title
76
- @entry['title'].should == "Nokogiri’s Slop Feature"
77
- @entry['author'] == @entry.author
78
- @entry['author'].should == "Aaron Patterson"
72
+ expect(@entry['title']).to eq "Nokogiri’s Slop Feature"
73
+ expect(@entry['author']).to eq "Aaron Patterson"
79
74
  end
80
75
 
81
76
  it "should allow setting field values with hash syntax" do
82
77
  @entry['title'] = "Foobar"
83
- @entry.title.should == "Foobar"
78
+ expect(@entry.title).to eq "Foobar"
84
79
  end
85
80
  end
@@ -6,6 +6,7 @@ describe Feedjira::Parser::RSSFeedBurnerEntry do
6
6
  # I don't really like doing it this way because these unit test should only rely on RSSEntry,
7
7
  # but this is actually how it should work. You would never just pass entry xml straight to the AtomEnry
8
8
  @entry = Feedjira::Parser::RSSFeedBurner.parse(sample_rss_feed_burner_feed).entries.first
9
+ Feedjira::Feed.add_common_feed_entry_element("wfw:commentRss", :as => :comment_rss)
9
10
  end
10
11
 
11
12
  after(:each) do
@@ -16,70 +17,64 @@ describe Feedjira::Parser::RSSFeedBurnerEntry do
16
17
  end
17
18
 
18
19
  it "should parse the title" do
19
- @entry.title.should == "Angie’s List Sets Price Range IPO At $11 To $13 Per Share; Valued At Over $600M"
20
+ expect(@entry.title).to eq "Angie’s List Sets Price Range IPO At $11 To $13 Per Share; Valued At Over $600M"
20
21
  end
21
22
 
22
23
  it "should parse the original url" do
23
- @entry.url.should == "http://techcrunch.com/2011/11/02/angies-list-prices-ipo-at-11-to-13-per-share-valued-at-over-600m/"
24
+ expect(@entry.url).to eq "http://techcrunch.com/2011/11/02/angies-list-prices-ipo-at-11-to-13-per-share-valued-at-over-600m/"
24
25
  end
25
26
 
26
27
  it "should parse the author" do
27
- @entry.author.should == "Leena Rao"
28
+ expect(@entry.author).to eq "Leena Rao"
28
29
  end
29
30
 
30
31
  it "should parse the content" do
31
- @entry.content.should == sample_rss_feed_burner_entry_content
32
+ expect(@entry.content).to eq sample_rss_feed_burner_entry_content
32
33
  end
33
34
 
34
35
  it "should provide a summary" do
35
- @entry.summary.should == sample_rss_feed_burner_entry_description
36
+ expect(@entry.summary).to eq sample_rss_feed_burner_entry_description
36
37
  end
37
38
 
38
39
  it "should parse the published date" do
39
- @entry.published.should == Time.parse_safely("Wed Nov 02 17:25:27 UTC 2011")
40
+ expect(@entry.published).to eq Time.parse_safely("Wed Nov 02 17:25:27 UTC 2011")
40
41
  end
41
42
 
42
43
  it "should parse the categories" do
43
- @entry.categories.should == ["TC", "angie\\'s list"]
44
+ expect(@entry.categories).to eq ["TC", "angie\\'s list"]
44
45
  end
45
46
 
46
47
  it "should parse the guid as id" do
47
- @entry.id.should == "http://techcrunch.com/?p=446154"
48
+ expect(@entry.id).to eq "http://techcrunch.com/?p=446154"
48
49
  end
49
50
 
50
51
  it "should support each" do
51
- @entry.respond_to? :each
52
+ expect(@entry).to respond_to :each
52
53
  end
53
54
 
54
55
  it "should be able to list out all fields with each" do
55
56
  all_fields = []
56
- @entry.each do |field, value|
57
- all_fields << field
58
- end
59
- all_fields.sort == ['author', 'categories', 'content', 'id', 'published', 'summary', 'title', 'url']
60
- end
61
-
62
- it "should be able to list out all values with each" do
63
57
  title_value = ''
64
58
  @entry.each do |field, value|
59
+ all_fields << field
65
60
  title_value = value if field == 'title'
66
61
  end
67
- title_value.should == "Angie’s List Sets Price Range IPO At $11 To $13 Per Share; Valued At Over $600M"
62
+ expect(all_fields.sort).to eq ["author", "categories", "comment_rss", "content", "entry_id", "image", "published", "summary", "title", "url"]
63
+ expect(title_value).to eq "Angie’s List Sets Price Range IPO At $11 To $13 Per Share; Valued At Over $600M"
68
64
  end
69
65
 
70
66
  it "should support checking if a field exists in the entry" do
71
- @entry.include?('title') && @entry.include?('author')
67
+ expect(@entry).to include 'author'
68
+ expect(@entry).to include 'title'
72
69
  end
73
70
 
74
71
  it "should allow access to fields with hash syntax" do
75
- @entry['title'] == @entry.title
76
- @entry['title'].should == "Angie’s List Sets Price Range IPO At $11 To $13 Per Share; Valued At Over $600M"
77
- @entry['author'] == @entry.author
78
- @entry['author'].should == "Leena Rao"
72
+ expect(@entry['author']).to eq "Leena Rao"
73
+ expect(@entry['title']).to eq "Angie’s List Sets Price Range IPO At $11 To $13 Per Share; Valued At Over $600M"
79
74
  end
80
75
 
81
76
  it "should allow setting field values with hash syntax" do
82
77
  @entry['title'] = "Foobar"
83
- @entry.title.should == "Foobar"
78
+ expect(@entry.title).to eq "Foobar"
84
79
  end
85
80
  end
@@ -3,23 +3,23 @@ require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])
3
3
  describe Feedjira::Parser::RSSFeedBurner do
4
4
  describe "#will_parse?" do
5
5
  it "should return true for a feedburner rss feed" do
6
- Feedjira::Parser::RSSFeedBurner.should be_able_to_parse(sample_rss_feed_burner_feed)
6
+ expect(Feedjira::Parser::RSSFeedBurner).to be_able_to_parse(sample_rss_feed_burner_feed)
7
7
  end
8
8
 
9
9
  it "should return false for a regular RSS feed" do
10
- Feedjira::Parser::RSSFeedBurner.should_not be_able_to_parse(sample_rss_feed)
10
+ expect(Feedjira::Parser::RSSFeedBurner).to_not be_able_to_parse(sample_rss_feed)
11
11
  end
12
12
 
13
13
  it "should return false for a feedburner atom feed" do
14
- Feedjira::Parser::RSSFeedBurner.should_not be_able_to_parse(sample_feedburner_atom_feed)
14
+ expect(Feedjira::Parser::RSSFeedBurner).to_not be_able_to_parse(sample_feedburner_atom_feed)
15
15
  end
16
16
 
17
17
  it "should return false for an rdf feed" do
18
- Feedjira::Parser::RSSFeedBurner.should_not be_able_to_parse(sample_rdf_feed)
18
+ expect(Feedjira::Parser::RSSFeedBurner).to_not be_able_to_parse(sample_rdf_feed)
19
19
  end
20
20
 
21
21
  it "should return false for a regular atom feed" do
22
- Feedjira::Parser::RSSFeedBurner.should_not be_able_to_parse(sample_atom_feed)
22
+ expect(Feedjira::Parser::RSSFeedBurner).to_not be_able_to_parse(sample_atom_feed)
23
23
  end
24
24
  end
25
25
 
@@ -29,29 +29,29 @@ describe Feedjira::Parser::RSSFeedBurner do
29
29
  end
30
30
 
31
31
  it "should parse the title" do
32
- @feed.title.should == "TechCrunch"
32
+ expect(@feed.title).to eq "TechCrunch"
33
33
  end
34
34
 
35
35
  it "should parse the description" do
36
- @feed.description.should == "TechCrunch is a group-edited blog that profiles the companies, products and events defining and transforming the new web."
36
+ expect(@feed.description).to eq "TechCrunch is a group-edited blog that profiles the companies, products and events defining and transforming the new web."
37
37
  end
38
38
 
39
39
  it "should parse the url" do
40
- @feed.url.should == "http://techcrunch.com"
40
+ expect(@feed.url).to eq "http://techcrunch.com"
41
41
  end
42
42
 
43
43
  it "should parse the hub urls" do
44
- @feed.hubs.count.should == 2
45
- @feed.hubs.first.should == "http://pubsubhubbub.appspot.com/"
44
+ expect(@feed.hubs.count).to eq 2
45
+ expect(@feed.hubs.first).to eq "http://pubsubhubbub.appspot.com/"
46
46
  end
47
47
 
48
48
  it "should provide an accessor for the feed_url" do
49
- @feed.respond_to?(:feed_url).should == true
50
- @feed.respond_to?(:feed_url=).should == true
49
+ expect(@feed).to respond_to :feed_url
50
+ expect(@feed).to respond_to :feed_url=
51
51
  end
52
52
 
53
53
  it "should parse entries" do
54
- @feed.entries.size.should == 20
54
+ expect(@feed.entries.size).to eq 20
55
55
  end
56
56
  end
57
57
  end
@@ -3,7 +3,7 @@ require File.join(File.dirname(__FILE__), %w[.. .. spec_helper])
3
3
  describe Feedjira::Parser::RSS do
4
4
  describe "#will_parse?" do
5
5
  it "should return true for an RSS feed" do
6
- Feedjira::Parser::RSS.should be_able_to_parse(sample_rss_feed)
6
+ expect(Feedjira::Parser::RSS).to be_able_to_parse(sample_rss_feed)
7
7
  end
8
8
 
9
9
  # this is no longer true. combined rdf and rss into one
@@ -12,11 +12,11 @@ describe Feedjira::Parser::RSS do
12
12
  # end
13
13
 
14
14
  it "should return false for an atom feed" do
15
- Feedjira::Parser::RSS.should_not be_able_to_parse(sample_atom_feed)
15
+ expect(Feedjira::Parser::RSS).to_not be_able_to_parse(sample_atom_feed)
16
16
  end
17
17
 
18
18
  it "should return false for an rss feedburner feed" do
19
- Feedjira::Parser::RSS.should_not be_able_to_parse(sample_rss_feed_burner_feed)
19
+ expect(Feedjira::Parser::RSS).to_not be_able_to_parse(sample_rss_feed_burner_feed)
20
20
  end
21
21
  end
22
22
 
@@ -26,32 +26,32 @@ describe Feedjira::Parser::RSS do
26
26
  end
27
27
 
28
28
  it "should parse the version" do
29
- @feed.version.should == "2.0"
29
+ expect(@feed.version).to eq "2.0"
30
30
  end
31
31
 
32
32
  it "should parse the title" do
33
- @feed.title.should == "Tender Lovemaking"
33
+ expect(@feed.title).to eq "Tender Lovemaking"
34
34
  end
35
35
 
36
36
  it "should parse the description" do
37
- @feed.description.should == "The act of making love, tenderly."
37
+ expect(@feed.description).to eq "The act of making love, tenderly."
38
38
  end
39
39
 
40
40
  it "should parse the url" do
41
- @feed.url.should == "http://tenderlovemaking.com"
41
+ expect(@feed.url).to eq "http://tenderlovemaking.com"
42
42
  end
43
43
 
44
44
  it "should not parse hub urls" do
45
- @feed.hubs.should == nil
45
+ expect(@feed.hubs).to be_nil
46
46
  end
47
47
 
48
48
  it "should provide an accessor for the feed_url" do
49
- @feed.respond_to?(:feed_url).should == true
50
- @feed.respond_to?(:feed_url=).should == true
49
+ expect(@feed).to respond_to :feed_url
50
+ expect(@feed).to respond_to :feed_url=
51
51
  end
52
52
 
53
53
  it "should parse entries" do
54
- @feed.entries.size.should == 10
54
+ expect(@feed.entries.size).to eq 10
55
55
  end
56
56
  end
57
57
  end
@@ -7,13 +7,13 @@ describe Feedjira::Preprocessor do
7
7
  processor = Feedjira::Preprocessor.new xml
8
8
  escaped = processor.to_xml
9
9
 
10
- escaped.should eq doc.to_xml
10
+ expect(escaped).to eq doc.to_xml
11
11
  end
12
12
 
13
13
  it 'escapes markup in xhtml content' do
14
14
  processor = Feedjira::Preprocessor.new sample_atom_xhtml_feed
15
15
  escaped = processor.to_xml
16
16
 
17
- escaped.split("\n")[26].should match /&lt;p&gt;$/
17
+ expect(escaped.split("\n")[26]).to match /&lt;p&gt;$/
18
18
  end
19
19
  end
@@ -19,7 +19,6 @@
19
19
  <itunes:image href="http://example.com/podcasts/everything/AllAboutEverything.jpg" />
20
20
  <itunes:category text="Technology">
21
21
  <itunes:category text="Gadgets"/>
22
- </itunes:category>
23
22
  <itunes:category text="TV &amp; Film"/>
24
23
 
25
24
  <item>
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,8 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../lib/feedjira')
2
2
  require 'sample_feeds'
3
3
 
4
+ SAXMachine.handler = ENV['HANDLER'].to_sym if ENV['HANDLER']
5
+
4
6
  RSpec.configure do |c|
5
7
  c.include SampleFeeds
6
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: feedjira
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Dix
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2014-07-30 00:00:00.000000000 Z
14
+ date: 2014-09-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: sax-machine
@@ -19,56 +19,56 @@ dependencies:
19
19
  requirements:
20
20
  - - "~>"
21
21
  - !ruby/object:Gem::Version
22
- version: 0.2.1
22
+ version: '1.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: 0.2.1
29
+ version: '1.0'
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: curb
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
34
  - - "~>"
35
35
  - !ruby/object:Gem::Version
36
- version: 0.8.1
36
+ version: '0.8'
37
37
  type: :runtime
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
41
  - - "~>"
42
42
  - !ruby/object:Gem::Version
43
- version: 0.8.1
43
+ version: '0.8'
44
44
  - !ruby/object:Gem::Dependency
45
45
  name: loofah
46
46
  requirement: !ruby/object:Gem::Requirement
47
47
  requirements:
48
48
  - - "~>"
49
49
  - !ruby/object:Gem::Version
50
- version: 2.0.0
50
+ version: '2.0'
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: 2.0.0
57
+ version: '2.0'
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: rspec
60
60
  requirement: !ruby/object:Gem::Requirement
61
61
  requirements:
62
62
  - - "~>"
63
63
  - !ruby/object:Gem::Version
64
- version: 2.14.0
64
+ version: '3.0'
65
65
  type: :development
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
- version: 2.14.0
71
+ version: '3.0'
72
72
  description: A library designed to retrieve and parse feeds as quickly as possible
73
73
  email: feedjira@gmail.com
74
74
  executables: []
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubyforge_project:
176
- rubygems_version: 2.2.1
176
+ rubygems_version: 2.2.2
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: A feed fetching and parsing library