pavlov_rss 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/pavlov_rss/reader.rb +1 -1
- data/lib/pavlov_rss/version.rb +1 -1
- data/spec/lib/pavlov_rss/reader_spec.rb +13 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db654d1ad2a3598481166857616cbffccaeb9407
|
4
|
+
data.tar.gz: 0190333578206965798e596c12d56be51c2c764c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc89f35da0811807a75a2c32e0ef613baa236f7d317f7d350682952078579bdcc63e945a33014f645ca31594a12aa50a7d1d228c85970f5cb93dc6b3d2a82e8c
|
7
|
+
data.tar.gz: b0843eca7c4b5ffb368d8dac4a5c0322bafc4e8feeb1e75d98269e26a9d326aedb6604599ef53d07572b7dcaac17bfa16382ca54fc381186bfc79e120eb3601a
|
data/Gemfile.lock
CHANGED
data/lib/pavlov_rss/reader.rb
CHANGED
data/lib/pavlov_rss/version.rb
CHANGED
@@ -6,14 +6,14 @@ describe PavlovRss::Reader do
|
|
6
6
|
describe '#hash_to_item' do
|
7
7
|
subject { described_class.new.hash_to_item(hash) }
|
8
8
|
|
9
|
-
|
9
|
+
context do
|
10
10
|
let(:hash) do
|
11
11
|
{'rss' => {'channel' => {'item' => []}}}
|
12
12
|
end
|
13
13
|
it { should be_empty }
|
14
14
|
end
|
15
15
|
|
16
|
-
|
16
|
+
context do
|
17
17
|
let(:hash) do
|
18
18
|
{'rss' => {'channel' => {'item' =>
|
19
19
|
{'title' => 'title1'}
|
@@ -22,7 +22,7 @@ describe PavlovRss::Reader do
|
|
22
22
|
it { should have(1).item }
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
context do
|
26
26
|
let(:hash) do
|
27
27
|
{'rss' => {'channel' => {'item' => [
|
28
28
|
{'title' => 'title1'},
|
@@ -31,6 +31,16 @@ describe PavlovRss::Reader do
|
|
31
31
|
end
|
32
32
|
it { should have(2).items }
|
33
33
|
end
|
34
|
+
|
35
|
+
context 'with atom' do
|
36
|
+
let(:hash) do
|
37
|
+
{'feed' => {'entry' => [
|
38
|
+
{'title' => 'title1'},
|
39
|
+
{'title' => 'title2'},
|
40
|
+
]}}
|
41
|
+
end
|
42
|
+
it { should have(2).items }
|
43
|
+
end
|
34
44
|
end
|
35
45
|
|
36
46
|
describe '#rss_to_hash' do
|