webspicy 0.20.0 → 0.20.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 576301cb14f9cc4abcb10c8638e7b7994397e3bd91c0f3e48fea49ff356dc81d
|
4
|
+
data.tar.gz: e19dc03f7daa686ec2c97f9f83b28249a7ccf16de852b5844bf68cf99291944e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e85cdd2ad61ed8b3e4a7d0362cd6543d6107ff4bbdba3586a3145c911e6d76d17a96347c28b56283804979ffea0a33ab47ba5426074450bc25b51ad78819c316
|
7
|
+
data.tar.gz: 3eb380f55e3f444f0cdd4268c00ef434b6f68ccca8cb10a3486be837a3d096dfd929d23b69d8ab872929995532491b9e3e41f1d44e2bff71ab078df10324a660
|
data/lib/webspicy/version.rb
CHANGED
@@ -36,11 +36,14 @@ module Webspicy
|
|
36
36
|
response.body.to_s
|
37
37
|
end
|
38
38
|
|
39
|
-
def
|
39
|
+
def is_structured_output?
|
40
40
|
ct = response.content_type || test_case.expected_content_type
|
41
41
|
ct = ct.mime_type if ct.respond_to?(:mime_type)
|
42
|
-
|
43
|
-
|
42
|
+
ct =~ /json/
|
43
|
+
end
|
44
|
+
|
45
|
+
def loaded_output
|
46
|
+
if is_structured_output?
|
44
47
|
raise "Body empty while expected" if raw_output.empty?
|
45
48
|
@loaded_output ||= ::JSON.parse(response.body)
|
46
49
|
else
|