api_rspecta 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6f9ad7a7e4afbb26bed3abbc65cf71cee50f2fd5
4
- data.tar.gz: 2daa834109d5baf75cfe27255090b2bfa7b0c62c
3
+ metadata.gz: f77fa2492889b6a1f3c20fbca7affa30541f7397
4
+ data.tar.gz: b3d0dbec54581e6f7326b0f3968e4b498a51bb12
5
5
  SHA512:
6
- metadata.gz: 5ae5f26d9607ae52ae990b497fbcae537f6ae5c7c9f37cbfe116374ac5ac820ae2f4bd6ecd3118ab42807acb1c9dbc835ea1998ca89818f8a3d6370a14f46ac5
7
- data.tar.gz: 7ef96b62126652da8dd16336c9d92e9f6cea53e2e239f9fb26c7092faa892aa9fd9c1cc85433840d473893936eb4cc4e53d1dfbd26e076dfa99f77d7012ee695
6
+ metadata.gz: 2f2690b1fe50cbfe1a095fd596c1356ba666ffecb9e934a494367c8c616b5071142e8ad023f2ad2d37fd30c35379a11af8b097f26c0aad791308a940372e8f7d
7
+ data.tar.gz: 27d56e8e9741bf0046e582355ae94f3aa0814a7ebe0c9f751ae0fa3c3fd09f6682cc82ea81267a59fe9a0116d4a95930f162972f5b455a15b937aead5a7c3ee1
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ [![Stories in Ready](https://badge.waffle.io/SmartCloud/api_rspecta.png?label=ready&title=Ready)](https://waffle.io/SmartCloud/api_rspecta)
1
2
  # API_RSpecta
2
3
 
3
4
  `api_rspecta` adds following helper methods to test your JSON APIs with RSpec:
@@ -4,11 +4,11 @@ module ApiRspecta
4
4
  module ApiRequestsHelpers
5
5
  module JsonHelpers
6
6
  def json
7
- @json ||= JSON.parse last_response.body
7
+ @json ||= JSON.parse response.body
8
8
  end
9
9
 
10
10
  def refresh_json
11
- @json = JSON.parse last_response.body
11
+ @json = JSON.parse response.body
12
12
  end
13
13
 
14
14
  def print_json
@@ -72,7 +72,7 @@ module ApiRspecta
72
72
  end
73
73
 
74
74
  def response_status(status)
75
- expect(last_response.status).to eq(status)
75
+ expect(response.status).to eq(status)
76
76
  end
77
77
 
78
78
  def should_respond_with_error_for(field)
@@ -2,8 +2,8 @@
2
2
 
3
3
  if RSpec.respond_to?(:configure)
4
4
  RSpec.configure do |c|
5
- c.include ApiRspecta::ApiRequestsHelpers::JsonHelpers, type: :api
6
- c.include ApiRspecta::ApiRequestsHelpers::ResponseHelpers, type: :api
7
- c.include ApiRspecta::ApiRequestsHelpers::RequestHelpers, type: :api
5
+ c.include ApiRspecta::ApiRequestsHelpers::JsonHelpers, type: :request
6
+ c.include ApiRspecta::ApiRequestsHelpers::ResponseHelpers, type: :request
7
+ c.include ApiRspecta::ApiRequestsHelpers::RequestHelpers, type: :request
8
8
  end
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module ApiRspecta
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_rspecta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Smart Cloud, Inc.
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-12-20 00:00:00.000000000 Z
13
+ date: 2016-03-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  requirements: []
109
109
  rubyforge_project:
110
- rubygems_version: 2.2.2
110
+ rubygems_version: 2.4.6
111
111
  signing_key:
112
112
  specification_version: 4
113
113
  summary: api_rspecta adds convenient methods to your RSpec to test JSON APIs.