squall 1.0.1 → 1.0.2

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.
data/lib/squall/base.rb CHANGED
@@ -8,6 +8,9 @@ module Squall
8
8
  # Returns true/false for successful/unsuccessful requests
9
9
  attr_reader :success
10
10
 
11
+ # HTTPart request result
12
+ attr_reader :result
13
+
11
14
  # HTTParty class methods
12
15
  include HTTParty
13
16
 
@@ -1,3 +1,3 @@
1
1
  module Squall
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
@@ -34,10 +34,11 @@ describe Squall::Base do
34
34
  describe "#request" do
35
35
  it "200-207 returns success" do
36
36
  (200..207).each do |i|
37
- mock_request(:get, "/#{i}", :status => [i, "OK"])
37
+ mock_request(:get, "/#{i}", :status => [i, "OK"], :body => "Body is OK")
38
38
  base = Squall::Base.new
39
39
  base.request(:get, "/#{i}")
40
40
  base.success.should be_true
41
+ base.result.should match(/OK/)
41
42
  end
42
43
  end
43
44
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squall
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Mazzi