kosher 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kosher/algorithm.rb +2 -0
- data/lib/kosher/errors.rb +3 -0
- data/lib/kosher/version.rb +1 -1
- data/lib/kosher.rb +1 -0
- data/spec/fixtures/cassette_library/batch-request.yml +8152 -0
- data/spec/kosher/algorithm_spec.rb +11 -0
- metadata +2 -1
@@ -21,6 +21,17 @@ module Kosher
|
|
21
21
|
request.get
|
22
22
|
end
|
23
23
|
|
24
|
+
describe ".new" do
|
25
|
+
it "raises an error if response is not valid" do
|
26
|
+
response = mock('Response')
|
27
|
+
response.stub!(:valid?).and_return(false)
|
28
|
+
|
29
|
+
expect do
|
30
|
+
Algorithm.new(response)
|
31
|
+
end.to raise_error ResponseNotValidError
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
24
35
|
describe "#items" do
|
25
36
|
it "should return found items" do
|
26
37
|
algorithm.items.count.should eql 19
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: kosher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Paper Cavalier
|
@@ -98,6 +98,7 @@ files:
|
|
98
98
|
- lib/kosher/algorithm.rb
|
99
99
|
- lib/kosher/condition.rb
|
100
100
|
- lib/kosher/description.rb
|
101
|
+
- lib/kosher/errors.rb
|
101
102
|
- lib/kosher/item.rb
|
102
103
|
- lib/kosher/offer.rb
|
103
104
|
- lib/kosher/request.rb
|