reviewed 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
1
  module Reviewed
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  API_VERSION = 'v1'
4
4
  end
@@ -1,4 +1,8 @@
1
1
  module Reviewed
2
2
  class Website < Base
3
+
4
+ def self.all
5
+ where({:per_page=>"all"})
6
+ end
3
7
  end
4
8
  end
data/spec/article_spec.rb CHANGED
@@ -6,7 +6,7 @@ describe Reviewed::Article do
6
6
 
7
7
  it 'finds a page with a matching slug' do
8
8
  article = Reviewed::Article.find('minden-master-ii-grill-review')
9
- article.pages.length.should == 10
9
+ article.pages.length.should == 9
10
10
  page = article.find_page('performance')
11
11
  page.should == article.pages[2]
12
12
  page.name.should == 'Performance'
@@ -37,7 +37,7 @@ describe Reviewed::Article do
37
37
  end
38
38
 
39
39
  it "returns the primary product" do
40
- @product.id.should eql('506b06970494340f51809caf')
40
+ @product.name.should eql('Big Green Egg Medium')
41
41
  end
42
42
 
43
43
  it "returns a product of the correct class" do
data/spec/base_spec.rb CHANGED
@@ -44,16 +44,19 @@ describe Reviewed::Base do
44
44
  context 'with a valid request' do
45
45
  use_vcr_cassette 'base/find_ok'
46
46
 
47
+ before(:each) do
48
+ @article = Reviewed::Article.find('big-green-egg-medium-charcoal-grill-review')
49
+ end
50
+
47
51
  it 'fetches content from the api' do
48
- model = Reviewed::Example.find('506b0b46bd02862270000747')
52
+ model = Reviewed::Example.find(@article.id)
49
53
  model.raw_response.should_not be_nil
50
54
  end
51
55
 
52
56
  it 'parses response json and returns an object' do
53
- model = Reviewed::Example.find('506b0b46bd02862270000747')
57
+ model = Reviewed::Example.find(@article.id)
54
58
  model.class.should == Reviewed::Example
55
- model.id.should == '506b0b46bd02862270000747'
56
- model.name.should == 'Minden Master II Grill Review'
59
+ model.name.should == 'Big Green Egg Medium Charcoal Grill Review'
57
60
  end
58
61
  end
59
62