feedjira 2.2.0 → 3.0.0.beta1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +635 -6
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +6 -12
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +5 -5
  7. data/README.md +37 -99
  8. data/Rakefile +5 -5
  9. data/feedjira.gemspec +27 -19
  10. data/lib/feedjira.rb +69 -41
  11. data/lib/feedjira/configuration.rb +3 -8
  12. data/lib/feedjira/core_ext.rb +3 -3
  13. data/lib/feedjira/core_ext/date.rb +1 -1
  14. data/lib/feedjira/core_ext/time.rb +2 -2
  15. data/lib/feedjira/date_time_utilities.rb +2 -2
  16. data/lib/feedjira/date_time_utilities/date_time_pattern_parser.rb +2 -2
  17. data/lib/feedjira/feed.rb +10 -80
  18. data/lib/feedjira/feed_entry_utilities.rb +4 -4
  19. data/lib/feedjira/parser.rb +4 -1
  20. data/lib/feedjira/parser/atom.rb +3 -3
  21. data/lib/feedjira/parser/atom_entry.rb +1 -1
  22. data/lib/feedjira/parser/atom_feed_burner.rb +4 -4
  23. data/lib/feedjira/parser/atom_feed_burner_entry.rb +1 -1
  24. data/lib/feedjira/parser/atom_youtube.rb +2 -2
  25. data/lib/feedjira/parser/atom_youtube_entry.rb +1 -1
  26. data/lib/feedjira/parser/google_docs_atom.rb +3 -3
  27. data/lib/feedjira/parser/google_docs_atom_entry.rb +1 -1
  28. data/lib/feedjira/parser/itunes_rss_item.rb +1 -1
  29. data/lib/feedjira/parser/json_feed.rb +39 -0
  30. data/lib/feedjira/parser/json_feed_item.rb +51 -0
  31. data/lib/feedjira/parser/podlove_chapter.rb +1 -1
  32. data/lib/feedjira/parser/rss.rb +1 -1
  33. data/lib/feedjira/parser/rss_entry.rb +5 -1
  34. data/lib/feedjira/parser/rss_feed_burner.rb +1 -1
  35. data/lib/feedjira/preprocessor.rb +1 -1
  36. data/lib/feedjira/version.rb +1 -1
  37. data/spec/feedjira/configuration_spec.rb +9 -16
  38. data/spec/feedjira/date_time_utilities_spec.rb +20 -20
  39. data/spec/feedjira/feed_entry_utilities_spec.rb +18 -18
  40. data/spec/feedjira/feed_spec.rb +15 -229
  41. data/spec/feedjira/feed_utilities_spec.rb +72 -72
  42. data/spec/feedjira/parser/atom_entry_spec.rb +34 -34
  43. data/spec/feedjira/parser/atom_feed_burner_entry_spec.rb +16 -16
  44. data/spec/feedjira/parser/atom_feed_burner_spec.rb +121 -119
  45. data/spec/feedjira/parser/atom_spec.rb +78 -76
  46. data/spec/feedjira/parser/atom_youtube_entry_spec.rb +38 -38
  47. data/spec/feedjira/parser/atom_youtube_spec.rb +15 -15
  48. data/spec/feedjira/parser/google_docs_atom_entry_spec.rb +8 -8
  49. data/spec/feedjira/parser/google_docs_atom_spec.rb +23 -21
  50. data/spec/feedjira/parser/itunes_rss_item_spec.rb +37 -37
  51. data/spec/feedjira/parser/itunes_rss_owner_spec.rb +5 -5
  52. data/spec/feedjira/parser/itunes_rss_spec.rb +118 -116
  53. data/spec/feedjira/parser/json_feed_item_spec.rb +79 -0
  54. data/spec/feedjira/parser/json_feed_spec.rb +53 -0
  55. data/spec/feedjira/parser/podlove_chapter_spec.rb +12 -12
  56. data/spec/feedjira/parser/rss_entry_spec.rb +30 -30
  57. data/spec/feedjira/parser/rss_feed_burner_entry_spec.rb +32 -32
  58. data/spec/feedjira/parser/rss_feed_burner_spec.rb +47 -45
  59. data/spec/feedjira/parser/rss_spec.rb +36 -36
  60. data/spec/feedjira/preprocessor_spec.rb +6 -6
  61. data/spec/feedjira_spec.rb +145 -0
  62. data/spec/sample_feeds.rb +27 -26
  63. data/spec/sample_feeds/HuffPostCanada.xml +279 -0
  64. data/spec/sample_feeds/json_feed.json +156 -0
  65. data/spec/spec_helper.rb +5 -5
  66. metadata +31 -49
  67. data/fixtures/vcr_cassettes/fetch_failure.yml +0 -62
  68. data/fixtures/vcr_cassettes/parse_error.yml +0 -222
  69. data/fixtures/vcr_cassettes/success.yml +0 -281
  70. data/spec/sample_feeds/InvalidDateFormat.xml +0 -20
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Feedjira::FeedUtilities do
4
4
  before(:each) do
@@ -8,17 +8,17 @@ describe Feedjira::FeedUtilities do
8
8
  end
9
9
  end
10
10
 
11
- describe 'preprocessing' do
12
- context 'when the flag is not set' do
13
- it 'does not call the preprocessing method' do
11
+ describe "preprocessing" do
12
+ context "when the flag is not set" do
13
+ it "does not call the preprocessing method" do
14
14
  @klass.preprocess_xml = false
15
15
  expect(@klass).to_not receive :preprocess
16
16
  @klass.parse sample_rss_feed
17
17
  end
18
18
  end
19
19
 
20
- context 'when the flag is set' do
21
- it 'calls the preprocessing method' do
20
+ context "when the flag is set" do
21
+ it "calls the preprocessing method" do
22
22
  @klass.preprocess_xml = true
23
23
  expect(@klass).to receive(:preprocess).and_return sample_rss_feed
24
24
  @klass.parse sample_rss_feed
@@ -26,46 +26,46 @@ describe Feedjira::FeedUtilities do
26
26
  end
27
27
  end
28
28
 
29
- describe 'strip whitespace' do
30
- context 'strip_whitespace config is true' do
31
- it 'strips all XML whitespace' do
29
+ describe "strip whitespace" do
30
+ context "strip_whitespace config is true" do
31
+ it "strips all XML whitespace" do
32
32
  Feedjira.configure { |config| config.strip_whitespace = true }
33
33
 
34
- expect(@klass.strip_whitespace("\nfoobar\n")).to eq('foobar')
34
+ expect(@klass.strip_whitespace("\nfoobar\n")).to eq("foobar")
35
35
 
36
36
  Feedjira.configure { |config| config.strip_whitespace = false }
37
37
  end
38
38
  end
39
39
 
40
- context 'strip_whitespace config is false' do
41
- it 'lstrips XML whitespace' do
40
+ context "strip_whitespace config is false" do
41
+ it "lstrips XML whitespace" do
42
42
  expect(@klass.strip_whitespace("\nfoobar\n")).to eq("foobar\n")
43
43
  end
44
44
  end
45
45
  end
46
46
 
47
- describe 'instance methods' do
48
- it 'should provide an updated? accessor' do
47
+ describe "instance methods" do
48
+ it "should provide an updated? accessor" do
49
49
  feed = @klass.new
50
50
  expect(feed).to_not be_updated
51
51
  feed.updated = true
52
52
  expect(feed).to be_updated
53
53
  end
54
54
 
55
- it 'should provide a new_entries accessor' do
55
+ it "should provide a new_entries accessor" do
56
56
  feed = @klass.new
57
57
  expect(feed.new_entries).to eq []
58
58
  feed.new_entries = [:foo]
59
59
  expect(feed.new_entries).to eq [:foo]
60
60
  end
61
61
 
62
- it 'should provide an etag accessor' do
62
+ it "should provide an etag accessor" do
63
63
  feed = @klass.new
64
- feed.etag = 'foo'
65
- expect(feed.etag).to eq 'foo'
64
+ feed.etag = "foo"
65
+ expect(feed.etag).to eq "foo"
66
66
  end
67
67
 
68
- it 'should provide a last_modified accessor' do
68
+ it "should provide a last_modified accessor" do
69
69
  feed = @klass.new
70
70
  time = Time.now
71
71
  feed.last_modified = time
@@ -73,7 +73,7 @@ describe Feedjira::FeedUtilities do
73
73
  expect(feed.last_modified.class).to eq Time
74
74
  end
75
75
 
76
- it 'should return new_entries? as true when entries are put into new_entries' do # rubocop:disable Metrics/LineLength
76
+ it "should return new_entries? as true when entries are put into new_entries" do # rubocop:disable Metrics/LineLength
77
77
  feed = @klass.new
78
78
  feed.new_entries << :foo
79
79
  expect(feed.new_entries?).to eq true
@@ -87,7 +87,7 @@ describe Feedjira::FeedUtilities do
87
87
  expect(feed.last_modified).to eq entry.published
88
88
  end
89
89
 
90
- it 'should not throw an error if one of the entries has published date of nil' do # rubocop:disable Metrics/LineLength
90
+ it "should not throw an error if one of the entries has published date of nil" do # rubocop:disable Metrics/LineLength
91
91
  feed = Feedjira::Parser::Atom.new
92
92
  entry = Feedjira::Parser::AtomEntry.new
93
93
  entry.published = Time.now.to_s
@@ -97,99 +97,99 @@ describe Feedjira::FeedUtilities do
97
97
  end
98
98
  end
99
99
 
100
- describe '#update_from_feed' do
101
- describe 'updating feed attributes' do
100
+ describe "#update_from_feed" do
101
+ describe "updating feed attributes" do
102
102
  before(:each) do
103
103
  # I'm using the Atom class when I know I should be using a different
104
104
  # one. However, this update_from_feed method would only be called
105
105
  # against a feed item.
106
106
  @feed = Feedjira::Parser::Atom.new
107
- @feed.title = 'A title'
108
- @feed.url = 'http://pauldix.net'
109
- @feed.feed_url = 'http://feeds.feedburner.com/PaulDixExplainsNothing'
107
+ @feed.title = "A title"
108
+ @feed.url = "http://pauldix.net"
109
+ @feed.feed_url = "http://feeds.feedburner.com/PaulDixExplainsNothing"
110
110
  @feed.updated = false
111
111
  @updated_feed = @feed.dup
112
112
  end
113
113
 
114
- it 'should update the title if changed' do
115
- @updated_feed.title = 'new title'
114
+ it "should update the title if changed" do
115
+ @updated_feed.title = "new title"
116
116
  @feed.update_from_feed(@updated_feed)
117
117
  expect(@feed.title).to eq @updated_feed.title
118
118
  expect(@feed).to be_updated
119
119
  end
120
120
 
121
- it 'should not update the title if the same' do
121
+ it "should not update the title if the same" do
122
122
  @feed.update_from_feed(@updated_feed)
123
123
  expect(@feed).to_not be_updated
124
124
  end
125
125
 
126
- it 'should update the feed_url if changed' do
127
- @updated_feed.feed_url = 'a new feed url'
126
+ it "should update the feed_url if changed" do
127
+ @updated_feed.feed_url = "a new feed url"
128
128
  @feed.update_from_feed(@updated_feed)
129
129
  expect(@feed.feed_url).to eq @updated_feed.feed_url
130
130
  expect(@feed).to be_updated
131
131
  end
132
132
 
133
- it 'should not update the feed_url if the same' do
133
+ it "should not update the feed_url if the same" do
134
134
  @feed.update_from_feed(@updated_feed)
135
135
  expect(@feed).to_not be_updated
136
136
  end
137
137
 
138
- it 'should update the url if changed' do
139
- @updated_feed.url = 'a new url'
138
+ it "should update the url if changed" do
139
+ @updated_feed.url = "a new url"
140
140
  @feed.update_from_feed(@updated_feed)
141
141
  expect(@feed.url).to eq @updated_feed.url
142
142
  end
143
143
 
144
- it 'should not update the url if not changed' do
144
+ it "should not update the url if not changed" do
145
145
  @feed.update_from_feed(@updated_feed)
146
146
  expect(@feed).to_not be_updated
147
147
  end
148
148
  end
149
149
 
150
- describe 'updating entries' do
150
+ describe "updating entries" do
151
151
  before(:each) do
152
152
  # I'm using the Atom class when I know I should be using a different
153
153
  # one. However, this update_from_feed method would only be called
154
154
  # against a feed item.
155
155
  @feed = Feedjira::Parser::Atom.new
156
- @feed.title = 'A title'
157
- @feed.url = 'http://pauldix.net'
158
- @feed.feed_url = 'http://feeds.feedburner.com/PaulDixExplainsNothing'
156
+ @feed.title = "A title"
157
+ @feed.url = "http://pauldix.net"
158
+ @feed.feed_url = "http://feeds.feedburner.com/PaulDixExplainsNothing"
159
159
  @feed.updated = false
160
160
  @updated_feed = @feed.dup
161
161
  @old_entry = Feedjira::Parser::AtomEntry.new
162
- @old_entry.url = 'http://pauldix.net/old.html'
162
+ @old_entry.url = "http://pauldix.net/old.html"
163
163
  @old_entry.published = Time.now.to_s
164
- @old_entry.entry_id = 'entry_id_old'
164
+ @old_entry.entry_id = "entry_id_old"
165
165
  @new_entry = Feedjira::Parser::AtomEntry.new
166
- @new_entry.url = 'http://pauldix.net/new.html'
166
+ @new_entry.url = "http://pauldix.net/new.html"
167
167
  @new_entry.published = (Time.now + 10).to_s
168
- @new_entry.entry_id = 'entry_id_new'
168
+ @new_entry.entry_id = "entry_id_new"
169
169
  @feed.entries << @old_entry
170
170
  @updated_feed.entries << @new_entry
171
171
  @updated_feed.entries << @old_entry
172
172
  end
173
173
 
174
- it 'should update last-modified from the latest entry date' do
174
+ it "should update last-modified from the latest entry date" do
175
175
  @feed.update_from_feed(@updated_feed)
176
176
  expect(@feed.last_modified).to eq @new_entry.published
177
177
  end
178
178
 
179
- it 'should put new entries into new_entries' do
179
+ it "should put new entries into new_entries" do
180
180
  @feed.update_from_feed(@updated_feed)
181
181
  expect(@feed.new_entries).to eq [@new_entry]
182
182
  end
183
183
 
184
- it 'should also put new entries into the entries collection' do
184
+ it "should also put new entries into the entries collection" do
185
185
  @feed.update_from_feed(@updated_feed)
186
186
  expect(@feed.entries).to include(@new_entry)
187
187
  expect(@feed.entries).to include(@old_entry)
188
188
  end
189
189
  end
190
190
 
191
- describe '#update_from_feed' do
192
- let(:recent_entry_id) { 'entry_id' }
191
+ describe "#update_from_feed" do
192
+ let(:recent_entry_id) { "entry_id" }
193
193
  let(:old_entry_id) { nil }
194
194
 
195
195
  before(:each) do
@@ -197,25 +197,25 @@ describe Feedjira::FeedUtilities do
197
197
  # one. However, this update_from_feed method would only be called
198
198
  # against a feed item.
199
199
  @feed = Feedjira::Parser::Atom.new
200
- @feed.title = 'A title'
201
- @feed.url = 'http://pauldix.net'
202
- @feed.feed_url = 'http://feeds.feedburner.com/PaulDixExplainsNothing'
200
+ @feed.title = "A title"
201
+ @feed.url = "http://pauldix.net"
202
+ @feed.feed_url = "http://feeds.feedburner.com/PaulDixExplainsNothing"
203
203
  @feed.updated = false
204
204
  @updated_feed = @feed.dup
205
205
 
206
206
  @old_entry = Feedjira::Parser::AtomEntry.new
207
- @old_entry.url = 'http://pauldix.net/old.html'
207
+ @old_entry.url = "http://pauldix.net/old.html"
208
208
  @old_entry.entry_id = old_entry_id
209
209
  @old_entry.published = (Time.now - 10).to_s
210
210
 
211
211
  @entry = Feedjira::Parser::AtomEntry.new
212
212
  @entry.published = (Time.now + 10).to_s
213
213
  @entry.entry_id = recent_entry_id
214
- @entry.url = 'http://pauldix.net/entry.html'
214
+ @entry.url = "http://pauldix.net/entry.html"
215
215
 
216
216
  # only difference is a changed url
217
217
  @entry_changed_url = @entry.dup
218
- @entry_changed_url.url = 'http://pauldix.net/updated.html'
218
+ @entry_changed_url.url = "http://pauldix.net/updated.html"
219
219
 
220
220
  # entry with changed url must be first
221
221
  @feed.entries << @entry
@@ -224,8 +224,8 @@ describe Feedjira::FeedUtilities do
224
224
  @updated_feed.entries << @old_entry
225
225
  end
226
226
 
227
- context 'changing the url of an existing entry' do
228
- it 'should not put the complete feed into new_entries' do
227
+ context "changing the url of an existing entry" do
228
+ it "should not put the complete feed into new_entries" do
229
229
  @feed.update_from_feed(@updated_feed)
230
230
  expect(@feed.new_entries).to_not include(@entry_changed_url)
231
231
  expect(@feed.new_entries).to_not include(@old_entry)
@@ -234,11 +234,11 @@ describe Feedjira::FeedUtilities do
234
234
  end
235
235
  end
236
236
 
237
- context 'feed not have entry id and only difference is a url' do
237
+ context "feed not have entry id and only difference is a url" do
238
238
  let(:recent_entry_id) { nil }
239
239
  let(:old_entry_id) { nil }
240
240
 
241
- it 'should put the complete feed into new_entries' do
241
+ it "should put the complete feed into new_entries" do
242
242
  @feed.update_from_feed(@updated_feed)
243
243
  expect(@feed.new_entries).to include(@entry_changed_url)
244
244
  expect(@feed.new_entries).to include(@old_entry)
@@ -248,42 +248,42 @@ describe Feedjira::FeedUtilities do
248
248
  end
249
249
  end
250
250
 
251
- describe 'updating with a feed' do
252
- let(:id_one) { '1' }
253
- let(:id_two) { '2' }
251
+ describe "updating with a feed" do
252
+ let(:id_one) { "1" }
253
+ let(:id_two) { "2" }
254
254
 
255
- let(:url_one) { 'http://example.com/post_one.html' }
256
- let(:url_two) { 'http://example.com/post_two.html' }
255
+ let(:url_one) { "http://example.com/post_one.html" }
256
+ let(:url_two) { "http://example.com/post_two.html" }
257
257
 
258
- let(:entry_one) { double 'Entry One', entry_id: id_one, url: url_one }
259
- let(:entry_two) { double 'Entry Two', entry_id: id_two, url: url_two }
258
+ let(:entry_one) { double "Entry One", entry_id: id_one, url: url_one }
259
+ let(:entry_two) { double "Entry Two", entry_id: id_two, url: url_two }
260
260
 
261
261
  let(:feed_one) { Feedjira::Parser::Atom.new }
262
- let(:feed_two) { double 'Feed Two', entries: [entry_two] }
262
+ let(:feed_two) { double "Feed Two", entries: [entry_two] }
263
263
 
264
264
  before do
265
- stub_const('Feedjira::FeedUtilities::UPDATABLE_ATTRIBUTES', [])
265
+ stub_const("Feedjira::FeedUtilities::UPDATABLE_ATTRIBUTES", [])
266
266
  feed_one.entries << entry_one
267
267
  end
268
268
 
269
- it 'finds entries with unique ids and urls' do
269
+ it "finds entries with unique ids and urls" do
270
270
  feed_one.update_from_feed feed_two
271
271
  expect(feed_one.new_entries).to eq [entry_two]
272
272
  end
273
273
 
274
- context 'when the entries have the same id' do
274
+ context "when the entries have the same id" do
275
275
  let(:id_two) { id_one }
276
276
 
277
- it 'does not find a new entry' do
277
+ it "does not find a new entry" do
278
278
  feed_one.update_from_feed feed_two
279
279
  expect(feed_one.new_entries).to eq []
280
280
  end
281
281
  end
282
282
 
283
- context 'when the entries have the same url' do
283
+ context "when the entries have the same url" do
284
284
  let(:url_two) { url_one }
285
285
 
286
- it 'does not find a new entry' do
286
+ it "does not find a new entry" do
287
287
  feed_one.update_from_feed feed_two
288
288
  expect(feed_one.new_entries).to eq []
289
289
  end
@@ -1,4 +1,4 @@
1
- require 'spec_helper'
1
+ require "spec_helper"
2
2
 
3
3
  describe Feedjira::Parser::AtomEntry do
4
4
  before(:each) do
@@ -8,66 +8,66 @@ describe Feedjira::Parser::AtomEntry do
8
8
  @entry = Feedjira::Parser::Atom.parse(sample_atom_feed).entries.first
9
9
  end
10
10
 
11
- it 'should parse the title' do
12
- title = 'AWS Job: Architect & Designer Position in Turkey'
11
+ it "should parse the title" do
12
+ title = "AWS Job: Architect & Designer Position in Turkey"
13
13
  expect(@entry.title).to eq title
14
14
  end
15
15
 
16
- it 'should parse the url' do
17
- expect(@entry.url).to eq 'http://aws.typepad.com/aws/2009/01/aws-job-architect-designer-position-in-turkey.html'
16
+ it "should parse the url" do
17
+ expect(@entry.url).to eq "http://aws.typepad.com/aws/2009/01/aws-job-architect-designer-position-in-turkey.html"
18
18
  end
19
19
 
20
- it 'should parse the url even when' do
21
- xml = load_sample('atom_with_link_tag_for_url_unmarked.xml')
20
+ it "should parse the url even when" do
21
+ xml = load_sample("atom_with_link_tag_for_url_unmarked.xml")
22
22
  entries = Feedjira::Parser::Atom.parse(xml).entries
23
- expect(entries.first.url).to eq 'http://www.innoq.com/blog/phaus/2009/07/ja.html'
23
+ expect(entries.first.url).to eq "http://www.innoq.com/blog/phaus/2009/07/ja.html"
24
24
  end
25
25
 
26
- it 'should parse the author' do
27
- expect(@entry.author).to eq 'AWS Editor'
26
+ it "should parse the author" do
27
+ expect(@entry.author).to eq "AWS Editor"
28
28
  end
29
29
 
30
- it 'should parse the content' do
30
+ it "should parse the content" do
31
31
  expect(@entry.content).to eq sample_atom_entry_content
32
32
  end
33
33
 
34
- it 'should provide a summary' do
34
+ it "should provide a summary" do
35
35
  summary = "Late last year an entrepreneur from Turkey visited me at Amazon HQ in Seattle. We talked about his plans to use AWS as part of his new social video portal startup. I won't spill any beans before he's ready to..." # rubocop:disable Metrics/LineLength
36
36
  expect(@entry.summary).to eq summary
37
37
  end
38
38
 
39
- it 'should parse the published date' do
40
- published = Time.parse_safely 'Fri Jan 16 18:21:00 UTC 2009'
39
+ it "should parse the published date" do
40
+ published = Time.parse_safely "Fri Jan 16 18:21:00 UTC 2009"
41
41
  expect(@entry.published).to eq published
42
42
  end
43
43
 
44
- it 'should parse the categories' do
44
+ it "should parse the categories" do
45
45
  expect(@entry.categories).to eq %w(Turkey Seattle)
46
46
  end
47
47
 
48
- it 'should parse the updated date' do
49
- updated = Time.parse_safely 'Fri Jan 16 18:21:00 UTC 2009'
48
+ it "should parse the updated date" do
49
+ updated = Time.parse_safely "Fri Jan 16 18:21:00 UTC 2009"
50
50
  expect(@entry.updated).to eq updated
51
51
  end
52
52
 
53
- it 'should parse the id' do
54
- expect(@entry.id).to eq 'tag:typepad.com,2003:post-61484736'
53
+ it "should parse the id" do
54
+ expect(@entry.id).to eq "tag:typepad.com,2003:post-61484736"
55
55
  end
56
56
 
57
- it 'should support each' do
57
+ it "should support each" do
58
58
  expect(@entry).to respond_to :each
59
59
  end
60
60
 
61
- it 'should be able to list out all fields with each' do
61
+ it "should be able to list out all fields with each" do
62
62
  all_fields = []
63
- title_value = ''
63
+ title_value = ""
64
64
 
65
65
  @entry.each do |field, value|
66
66
  all_fields << field
67
- title_value = value if field == 'title'
67
+ title_value = value if field == "title"
68
68
  end
69
69
 
70
- expect(title_value).to eq 'AWS Job: Architect & Designer Position in Turkey'
70
+ expect(title_value).to eq "AWS Job: Architect & Designer Position in Turkey"
71
71
 
72
72
  expected_fields = %w(
73
73
  author
@@ -84,19 +84,19 @@ describe Feedjira::Parser::AtomEntry do
84
84
  expect(all_fields.sort).to eq expected_fields
85
85
  end
86
86
 
87
- it 'should support checking if a field exists in the entry' do
88
- expect(@entry).to include 'author'
89
- expect(@entry).to include 'title'
87
+ it "should support checking if a field exists in the entry" do
88
+ expect(@entry).to include "author"
89
+ expect(@entry).to include "title"
90
90
  end
91
91
 
92
- it 'should allow access to fields with hash syntax' do
93
- title = 'AWS Job: Architect & Designer Position in Turkey'
94
- expect(@entry['title']).to eq title
95
- expect(@entry['author']).to eq 'AWS Editor'
92
+ it "should allow access to fields with hash syntax" do
93
+ title = "AWS Job: Architect & Designer Position in Turkey"
94
+ expect(@entry["title"]).to eq title
95
+ expect(@entry["author"]).to eq "AWS Editor"
96
96
  end
97
97
 
98
- it 'should allow setting field values with hash syntax' do
99
- @entry['title'] = 'Foobar'
100
- expect(@entry.title).to eq 'Foobar'
98
+ it "should allow setting field values with hash syntax" do
99
+ @entry["title"] = "Foobar"
100
+ expect(@entry.title).to eq "Foobar"
101
101
  end
102
102
  end