reviewed 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/reviewed/article.rb +4 -0
- data/lib/reviewed/version.rb +1 -1
- data/spec/article_spec.rb +17 -0
- metadata +2 -2
data/lib/reviewed/article.rb
CHANGED
data/lib/reviewed/version.rb
CHANGED
data/spec/article_spec.rb
CHANGED
@@ -28,6 +28,23 @@ describe Reviewed::Article do
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
+
describe 'primary_product' do
|
32
|
+
use_vcr_cassette 'article/products'
|
33
|
+
|
34
|
+
before(:each) do
|
35
|
+
@article = Reviewed::Article.find('big-green-egg-medium-charcoal-grill-review')
|
36
|
+
@product = @article.primary_product
|
37
|
+
end
|
38
|
+
|
39
|
+
it "returns the primary product" do
|
40
|
+
@product.id.should eql('506b06970494340f51809caf')
|
41
|
+
end
|
42
|
+
|
43
|
+
it "returns a product of the correct class" do
|
44
|
+
@product.class.should == Reviewed::Product
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
31
48
|
describe 'attachments' do
|
32
49
|
use_vcr_cassette 'article/attachments'
|
33
50
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reviewed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-10-
|
13
|
+
date: 2012-10-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|