airborne 0.1.16 → 0.1.17
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/.travis.yml +2 -1
- data/README.md +1 -0
- data/airborne.gemspec +2 -2
- data/lib/airborne/base.rb +1 -1
- data/lib/airborne/request_expectations.rb +0 -12
- data/spec/airborne/rack/rack_sinatra_spec.rb +9 -0
- 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: 167b39d12f2837183ab27bc6291aceec9ac8cccc
|
4
|
+
data.tar.gz: c6c41f037674780d25625f182964c1d81c49dc90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d626f1463b9c76fc560af8b4bf4a6c82a86c6726321e3520d3a6c5d45b12f5a80483921fd68d44fb200dd95122fa0dad1bff73a8cab3918a3027337a0e42869d
|
7
|
+
data.tar.gz: 6963d36dfcbbe9151c618237ba92c1b2a30767f67b91a655694c73afc164eff36bf2a678f0b5cf610e988eeb11bbe7c13f1a12a26158b766ed6c89a6a65720ac
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
data/airborne.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'airborne'
|
3
|
-
s.version = '0.1.
|
4
|
-
s.date =
|
3
|
+
s.version = '0.1.17'
|
4
|
+
s.date = Date.today.to_s
|
5
5
|
s.summary = 'RSpec driven API testing framework'
|
6
6
|
s.authors = ['Alex Friedman', 'Seth Pollack']
|
7
7
|
s.email = ['a.friedman07@gmail.com', 'teampollack@gmail.com']
|
data/lib/airborne/base.rb
CHANGED
@@ -56,14 +56,6 @@ module Airborne
|
|
56
56
|
-> (value) { yield DateTime.parse(value) }
|
57
57
|
end
|
58
58
|
|
59
|
-
[:expect_json_types, :expect_json, :expect_json_keys, :expect_status, :expect_header, :expect_header_contains].each do |method_name|
|
60
|
-
method = instance_method(method_name)
|
61
|
-
define_method(method_name) do |*args, &block|
|
62
|
-
set_rails_response
|
63
|
-
method.bind(self).call(*args, &block)
|
64
|
-
end
|
65
|
-
end
|
66
|
-
|
67
59
|
private
|
68
60
|
|
69
61
|
def expect_header_impl(key, content, contains = nil)
|
@@ -79,10 +71,6 @@ module Airborne
|
|
79
71
|
end
|
80
72
|
end
|
81
73
|
|
82
|
-
def set_rails_response
|
83
|
-
set_response(@response) if @json_body.nil?
|
84
|
-
end
|
85
|
-
|
86
74
|
def call_with_path(args)
|
87
75
|
if args.length == 2
|
88
76
|
get_by_path(args[0], json_body) do|json_chunk|
|
@@ -31,4 +31,13 @@ describe 'rack app' do
|
|
31
31
|
@response = Response.new({ foo: 'bar' }.to_json)
|
32
32
|
expect(json_body).to eq(foo: 'bar')
|
33
33
|
end
|
34
|
+
|
35
|
+
it 'Should work with consecutive requests' do
|
36
|
+
Response = Struct.new(:body, :headers)
|
37
|
+
@response = Response.new({ foo: 'bar' }.to_json)
|
38
|
+
expect(json_body).to eq(foo: 'bar')
|
39
|
+
|
40
|
+
@response = Response.new({ foo: 'boo' }.to_json)
|
41
|
+
expect(json_body).to eq(foo: 'boo')
|
42
|
+
end
|
34
43
|
end
|
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.1.
|
4
|
+
version: 0.1.17
|
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: 2015-
|
12
|
+
date: 2015-08-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -186,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
186
|
version: '0'
|
187
187
|
requirements: []
|
188
188
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.4.
|
189
|
+
rubygems_version: 2.4.8
|
190
190
|
signing_key:
|
191
191
|
specification_version: 4
|
192
192
|
summary: RSpec driven API testing framework
|