airborne 0.2.3 → 0.2.4
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d37e2129aab722cff3dd2400b133608e32df8c7
|
4
|
+
data.tar.gz: 082f2802b2347baab25c4ea0e39237c6730f5ade
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ecf6b2916ef3396883a15747c877bd50cb76346cc28d2b9fc45ebf4ba62f8c26586257f7b2a711a3cfc91f579987b8a50e1aaa70fbcfbf0e7c749d7d422e3ee
|
7
|
+
data.tar.gz: cba3ed6fcc10d6cf1612dfc66679cac3af45883ffd196acba0baa3f373f213fd233303628f2b4baf49602f07ef6df0b400608f99f05fd325589946ca2844816d
|
data/airborne.gemspec
CHANGED
@@ -122,7 +122,9 @@ module Airborne
|
|
122
122
|
|
123
123
|
val_class = value.class
|
124
124
|
|
125
|
-
|
125
|
+
type_string = type.to_s
|
126
|
+
|
127
|
+
if type_string.include?('array_of') && !type_string.include?('or_null')
|
126
128
|
check_array_types(value, val_class, prop, type)
|
127
129
|
else
|
128
130
|
expect_type(type, val_class, prop)
|
@@ -37,6 +37,20 @@ describe 'expect_json_types' do
|
|
37
37
|
expect { expect_json_types(bad: :array_of_ints) }.to raise_error(ExpectationNotMetError)
|
38
38
|
end
|
39
39
|
|
40
|
+
it "should allow array of types to be null" do
|
41
|
+
mock_get('simple_get')
|
42
|
+
get '/simple_get'
|
43
|
+
expect_json_types(address: :array_or_null)
|
44
|
+
expect_json_types(address: :array_of_integers_or_null)
|
45
|
+
expect_json_types(address: :array_of_ints_or_null)
|
46
|
+
expect_json_types(address: :array_of_floats_or_null)
|
47
|
+
expect_json_types(address: :array_of_strings_or_null)
|
48
|
+
expect_json_types(address: :array_of_booleans_or_null)
|
49
|
+
expect_json_types(address: :array_of_bools_or_null)
|
50
|
+
expect_json_types(address: :array_of_objects_or_null)
|
51
|
+
expect_json_types(address: :array_of_arrays_or_null)
|
52
|
+
end
|
53
|
+
|
40
54
|
it 'should allow empty array' do
|
41
55
|
mock_get('array_of_values')
|
42
56
|
get '/array_of_values'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: airborne
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Friedman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-
|
12
|
+
date: 2016-04-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
requirements: []
|
192
192
|
rubyforge_project:
|
193
|
-
rubygems_version: 2.4.
|
193
|
+
rubygems_version: 2.4.8
|
194
194
|
signing_key:
|
195
195
|
specification_version: 4
|
196
196
|
summary: RSpec driven API testing framework
|