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: c6f55b477b3b74d9872eb367610d368fb6b987b4
4
- data.tar.gz: e6b5489646213522e340f9f3d0e314535dd8ef15
3
+ metadata.gz: 7d37e2129aab722cff3dd2400b133608e32df8c7
4
+ data.tar.gz: 082f2802b2347baab25c4ea0e39237c6730f5ade
5
5
  SHA512:
6
- metadata.gz: 127e91334701c8b69e7bdbe8430b19c903708e608147f7c67c9a9e127d8b0757d7f9fa786497ccfc3ca789b4486f061333a9490cf6a3fe82e58ffd95ef6469d5
7
- data.tar.gz: 89693d8b556bdd84127685789ee3d38da29bc4b209f08faf4ea0e32faa482b5616730f24e8bab9f6389916dd1beec20e2f687714bb795a8245319a987eb17df5
6
+ metadata.gz: 3ecf6b2916ef3396883a15747c877bd50cb76346cc28d2b9fc45ebf4ba62f8c26586257f7b2a711a3cfc91f579987b8a50e1aaa70fbcfbf0e7c749d7d422e3ee
7
+ data.tar.gz: cba3ed6fcc10d6cf1612dfc66679cac3af45883ffd196acba0baa3f373f213fd233303628f2b4baf49602f07ef6df0b400608f99f05fd325589946ca2844816d
data/airborne.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'airborne'
3
- s.version = '0.2.3'
3
+ s.version = '0.2.4'
4
4
  s.date = Date.today.to_s
5
5
  s.summary = 'RSpec driven API testing framework'
6
6
  s.authors = ['Alex Friedman', 'Seth Pollack']
@@ -122,7 +122,9 @@ module Airborne
122
122
 
123
123
  val_class = value.class
124
124
 
125
- if type.to_s.include?('array_of')
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.3
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-02-09 00:00:00.000000000 Z
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.5.1
193
+ rubygems_version: 2.4.8
194
194
  signing_key:
195
195
  specification_version: 4
196
196
  summary: RSpec driven API testing framework