|
17 | 17 | it "should return stories that are new based on published date" do |
18 | 18 | new_story = stub(published: Time.new(2013, 1, 5)) |
19 | 19 | old_story = stub(published: Time.new(2013, 1, 1)) |
20 | | - feed = stub(last_modified: Time.new(2013, 1, 5), stories: [new_story, old_story]) |
| 20 | + feed = stub(last_modified: Time.new(2013, 1, 5), entries: [new_story, old_story]) |
21 | 21 |
|
22 | 22 | result = FindNewStories.new(feed, Time.new(2013, 1, 3)).new_stories |
23 | 23 | result.should eq [new_story] |
|
28 | 28 | it "should check all stories and compare published time" do |
29 | 29 | new_story = stub(published: Time.new(2013, 1, 5)) |
30 | 30 | old_story = stub(published: Time.new(2013, 1, 1)) |
31 | | - feed = stub(last_modified: nil, stories: [new_story, old_story]) |
| 31 | + feed = stub(last_modified: nil, entries: [new_story, old_story]) |
32 | 32 |
|
33 | 33 | result = FindNewStories.new(feed, Time.new(2013, 1, 3)).new_stories |
34 | 34 | result.should eq [new_story] |
|
39 | 39 | it "should scan until matching the last url" do |
40 | 40 | new_story = stub(published: nil, url: "http://blog.com/new-story") |
41 | 41 | old_story = stub(published: nil, url: "http://blog.com/old-story") |
42 | | - feed = stub(last_modified: nil, stories: [new_story, old_story]) |
| 42 | + feed = stub(last_modified: nil, entries: [new_story, old_story]) |
43 | 43 |
|
44 | 44 | result = FindNewStories.new(feed, Time.new(2013, 1, 3), "http://blog.com/old-story").new_stories |
45 | 45 | result.should eq [new_story] |
|
0 commit comments