api_rspecta 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/api_rspecta.rb +3 -3
- data/lib/api_rspecta/init.rb +3 -3
- data/lib/api_rspecta/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f77fa2492889b6a1f3c20fbca7affa30541f7397
|
|
4
|
+
data.tar.gz: b3d0dbec54581e6f7326b0f3968e4b498a51bb12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2f2690b1fe50cbfe1a095fd596c1356ba666ffecb9e934a494367c8c616b5071142e8ad023f2ad2d37fd30c35379a11af8b097f26c0aad791308a940372e8f7d
|
|
7
|
+
data.tar.gz: 27d56e8e9741bf0046e582355ae94f3aa0814a7ebe0c9f751ae0fa3c3fd09f6682cc82ea81267a59fe9a0116d4a95930f162972f5b455a15b937aead5a7c3ee1
|
data/README.md
CHANGED
data/lib/api_rspecta.rb
CHANGED
|
@@ -4,11 +4,11 @@ module ApiRspecta
|
|
|
4
4
|
module ApiRequestsHelpers
|
|
5
5
|
module JsonHelpers
|
|
6
6
|
def json
|
|
7
|
-
@json ||= JSON.parse
|
|
7
|
+
@json ||= JSON.parse response.body
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def refresh_json
|
|
11
|
-
@json = JSON.parse
|
|
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(
|
|
75
|
+
expect(response.status).to eq(status)
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
def should_respond_with_error_for(field)
|
data/lib/api_rspecta/init.rb
CHANGED
|
@@ -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: :
|
|
6
|
-
c.include ApiRspecta::ApiRequestsHelpers::ResponseHelpers, type: :
|
|
7
|
-
c.include ApiRspecta::ApiRequestsHelpers::RequestHelpers, type: :
|
|
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
|
data/lib/api_rspecta/version.rb
CHANGED
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.
|
|
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:
|
|
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.
|
|
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.
|