fetcher-microdata 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Fetcher
2
2
  class Microdata
3
- VERSION = "0.0.9"
3
+ VERSION = "0.0.10"
4
4
  end
5
5
  end
@@ -4,8 +4,9 @@ describe Writer::Fetcher::Microdata::Review do
4
4
  describe '#hash' do
5
5
  before do
6
6
  @schema_stub = stub 'schema'
7
- @author_stub = stub 'author', :to => stub( :hash => nil)
8
- @viewer_stub = stub 'viewer', :to => stub( :hash => nil)
7
+ @author_stub = stub 'author', :to => stub( :hash => "hi Im the author")
8
+ @viewer_stub = stub 'viewer', :to => stub( :hash => "hi Im the viewer")
9
+ @itemReviewed_stub = stub 'item review', :to => stub( :hash => "hi im the itemReviewed")
9
10
  end
10
11
 
11
12
  it 'should return a hash with the type' do
@@ -35,7 +36,8 @@ describe Writer::Fetcher::Microdata::Review do
35
36
  @schema_stub.should_receive(:attributes)
36
37
  .and_return :additionalType => "http://getfetcher.net/Item",
37
38
  :author => @author_stub,
38
- :viewer => @viewer_stub
39
+ :viewer => @viewer_stub,
40
+ :itemReviewed => @itemReviewed_stub
39
41
  end
40
42
 
41
43
  it 'should include the Item#id' do
@@ -46,18 +48,19 @@ describe Writer::Fetcher::Microdata::Review do
46
48
  }
47
49
 
48
50
  @schema_stub.should_receive(:attributes)
49
- .and_return :id => 234536234, :author => @author_stub, :viewer => @viewer_stub
51
+ .and_return :id => 234536234, :author => @author_stub, :viewer => @viewer_stub,
52
+ :itemReviewed => @itemReviewed_stub
50
53
  end
51
54
 
52
55
  it 'should include the itemReviewed' do
53
56
  @properties_hash = {
54
57
  "itemReviewed" => [
55
- "some body"
58
+ "hi im the itemReviewed"
56
59
  ]
57
60
  }
58
61
 
59
62
  @schema_stub.should_receive(:attributes)
60
- .and_return :itemReviewed => "some body", :author => @author_stub, :viewer => @viewer_stub
63
+ .and_return :itemReviewed => @itemReviewed_stub, :author => @author_stub, :viewer => @viewer_stub
61
64
  end
62
65
 
63
66
  it 'should include the author' do
@@ -72,7 +75,8 @@ describe Writer::Fetcher::Microdata::Review do
72
75
  }
73
76
 
74
77
  @schema_stub.should_receive(:attributes)
75
- .and_return :author => @author, :viewer => @viewer_stub
78
+ .and_return :author => @author, :viewer => @viewer_stub,
79
+ :itemReviewed => @itemReviewed_stub
76
80
  end
77
81
 
78
82
  it 'should include the viewer' do
@@ -87,7 +91,8 @@ describe Writer::Fetcher::Microdata::Review do
87
91
  }
88
92
 
89
93
  @schema_stub.should_receive(:attributes)
90
- .and_return :viewer => @viewer, :author => @author_stub
94
+ .and_return :viewer => @viewer, :author => @author_stub,
95
+ :itemReviewed => @itemReviewed_stub
91
96
  end
92
97
 
93
98
  it 'should include the dateCreated' do
@@ -98,7 +103,8 @@ describe Writer::Fetcher::Microdata::Review do
98
103
  }
99
104
 
100
105
  @schema_stub.should_receive(:attributes)
101
- .and_return :dateCreated => 23456235, :author => @author_stub, :viewer => @viewer_stub
106
+ .and_return :dateCreated => 23456235, :author => @author_stub, :viewer => @viewer_stub,
107
+ :itemReviewed => @itemReviewed_stub
102
108
  end
103
109
 
104
110
  it 'should include the provider' do
@@ -110,7 +116,8 @@ describe Writer::Fetcher::Microdata::Review do
110
116
  }
111
117
 
112
118
  @schema_stub.should_receive(:attributes)
113
- .and_return :provider => ["twitter", "fetcher"], :author => @author_stub, :viewer => @viewer_stub
119
+ .and_return :provider => ["twitter", "fetcher"], :author => @author_stub, :viewer => @viewer_stub,
120
+ :itemReviewed => @itemReviewed_stub
114
121
  end
115
122
 
116
123
  it 'should include the url' do
@@ -120,17 +127,18 @@ describe Writer::Fetcher::Microdata::Review do
120
127
  ]
121
128
  }
122
129
  @schema_stub.should_receive(:attributes)
123
- .and_return :url => "http://myurl.info", :author => @author_stub, :viewer => @viewer_stub
130
+ .and_return :url => "http://myurl.info", :author => @author_stub, :viewer => @viewer_stub,
131
+ :itemReviewed => @itemReviewed_stub
124
132
  end
125
133
 
126
134
  it 'should include the original tweet' do
127
135
  @properties_hash = {
128
136
  "itemReviewed" => [
129
- "Im the original tweet that was retreeted"
137
+ "hi im the itemReviewed"
130
138
  ]
131
139
  }
132
140
  @schema_stub.should_receive(:attributes)
133
- .and_return :itemReviewed => "Im the original tweet that was retreeted", :author => @author_stub, :viewer => @viewer_stub
141
+ .and_return :itemReviewed => @itemReviewed_stub, :author => @author_stub, :viewer => @viewer_stub
134
142
  end
135
143
 
136
144
  after :each do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fetcher-microdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-23 00:00:00.000000000 Z
12
+ date: 2012-12-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: discoverer