webspicy 0.18.0 → 0.20.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/bin/webspicy +6 -1
  3. data/doc/1-black-box-scene.md +109 -0
  4. data/doc/2-black-box-testing.md +27 -0
  5. data/doc/3-specification-importance.md +41 -0
  6. data/doc/4-sequence-diagram.md +82 -0
  7. data/lib/webspicy.rb +17 -9
  8. data/lib/webspicy/configuration.rb +48 -8
  9. data/lib/webspicy/configuration/scope.rb +22 -8
  10. data/lib/webspicy/formaldoc.fio +5 -5
  11. data/lib/webspicy/specification.rb +5 -2
  12. data/lib/webspicy/specification/condition.rb +48 -0
  13. data/lib/webspicy/specification/err.rb +18 -0
  14. data/lib/webspicy/specification/oldies.rb +4 -0
  15. data/lib/webspicy/specification/oldies/bridge.rb +32 -0
  16. data/lib/webspicy/specification/{errcondition.rb → oldies/errcondition.rb} +6 -0
  17. data/lib/webspicy/specification/{postcondition.rb → oldies/postcondition.rb} +6 -0
  18. data/lib/webspicy/specification/{precondition.rb → oldies/precondition.rb} +6 -2
  19. data/lib/webspicy/specification/post.rb +20 -0
  20. data/lib/webspicy/specification/post/missing_condition_impl.rb +15 -0
  21. data/lib/webspicy/specification/post/unexpected_condition_impl.rb +15 -0
  22. data/lib/webspicy/specification/pre.rb +19 -0
  23. data/lib/webspicy/specification/{precondition → pre}/global_request_headers.rb +4 -4
  24. data/lib/webspicy/specification/{precondition → pre}/robust_to_invalid_input.rb +4 -4
  25. data/lib/webspicy/specification/service.rb +34 -5
  26. data/lib/webspicy/specification/test_case.rb +11 -9
  27. data/lib/webspicy/support.rb +31 -0
  28. data/lib/webspicy/support/hooks.rb +65 -0
  29. data/lib/webspicy/support/world.rb +47 -0
  30. data/lib/webspicy/tester.rb +202 -3
  31. data/lib/webspicy/tester/assertions.rb +2 -2
  32. data/lib/webspicy/tester/client.rb +4 -50
  33. data/lib/webspicy/tester/fakeses.rb +41 -0
  34. data/lib/webspicy/tester/fakeses/email.rb +38 -0
  35. data/lib/webspicy/tester/fakesmtp.rb +39 -0
  36. data/lib/webspicy/tester/fakesmtp/email.rb +27 -0
  37. data/lib/webspicy/tester/file_checker.rb +22 -0
  38. data/lib/webspicy/tester/invocation.rb +15 -48
  39. data/lib/webspicy/tester/reporter.rb +85 -0
  40. data/lib/webspicy/tester/reporter/composite.rb +38 -0
  41. data/lib/webspicy/tester/reporter/documentation.rb +74 -0
  42. data/lib/webspicy/tester/reporter/error_count.rb +25 -0
  43. data/lib/webspicy/tester/reporter/exceptions.rb +62 -0
  44. data/lib/webspicy/tester/reporter/file_progress.rb +25 -0
  45. data/lib/webspicy/tester/reporter/file_summary.rb +43 -0
  46. data/lib/webspicy/tester/reporter/progress.rb +30 -0
  47. data/lib/webspicy/tester/reporter/summary.rb +63 -0
  48. data/lib/webspicy/tester/result.rb +142 -0
  49. data/lib/webspicy/tester/result/assert_met.rb +29 -0
  50. data/lib/webspicy/tester/result/check.rb +33 -0
  51. data/lib/webspicy/tester/result/errcondition_met.rb +29 -0
  52. data/lib/webspicy/tester/result/error_schema_met.rb +25 -0
  53. data/lib/webspicy/tester/result/invocation_succeeded.rb +13 -0
  54. data/lib/webspicy/tester/result/output_schema_met.rb +25 -0
  55. data/lib/webspicy/tester/result/postcondition_met.rb +29 -0
  56. data/lib/webspicy/tester/result/response_header_met.rb +43 -0
  57. data/lib/webspicy/tester/result/response_status_met.rb +25 -0
  58. data/lib/webspicy/version.rb +2 -2
  59. data/lib/webspicy/web.rb +4 -0
  60. data/lib/webspicy/web/client.rb +15 -0
  61. data/lib/webspicy/{tester → web}/client/http_client.rb +34 -14
  62. data/lib/webspicy/{tester → web}/client/rack_test_client.rb +3 -3
  63. data/lib/webspicy/{tester → web}/client/support.rb +2 -2
  64. data/lib/webspicy/web/invocation.rb +69 -0
  65. data/lib/webspicy/web/mocker.rb +90 -0
  66. data/lib/webspicy/{mocker → web/mocker}/config.ru +3 -2
  67. data/lib/webspicy/{openapi.rb → web/openapi.rb} +0 -0
  68. data/lib/webspicy/web/openapi/generator.rb +129 -0
  69. data/spec/unit/specification/{precondition → pre}/test_global_request_headers.rb +9 -4
  70. data/spec/unit/specification/test_condition.rb +44 -0
  71. data/spec/unit/support/hooks/test_fire_after_each.rb +53 -0
  72. data/spec/unit/{tester/client/test_around.rb → support/hooks/test_fire_around.rb} +15 -10
  73. data/spec/unit/support/hooks/test_fire_before_each.rb +53 -0
  74. data/spec/unit/support/world/fixtures/array.json +8 -0
  75. data/spec/unit/support/world/fixtures/queue.rb +1 -0
  76. data/spec/unit/support/world/fixtures/single.json +11 -0
  77. data/spec/unit/support/world/fixtures/yaml.yml +3 -0
  78. data/spec/unit/support/world/test_world.rb +56 -0
  79. data/spec/unit/test_configuration.rb +49 -0
  80. data/spec/unit/tester/fakeses/test_email.rb +40 -0
  81. data/spec/unit/web/mocker/test_mocker.rb +35 -0
  82. data/spec/unit/web/openapi/test_generator.rb +31 -0
  83. metadata +80 -65
  84. data/examples/restful/Gemfile +0 -5
  85. data/examples/restful/Rakefile +0 -25
  86. data/examples/restful/app.rb +0 -180
  87. data/examples/restful/webspicy/config.rb +0 -24
  88. data/examples/restful/webspicy/formaldef/todo/_one/delete.yml +0 -55
  89. data/examples/restful/webspicy/formaldef/todo/_one/get.simpler.yml +0 -46
  90. data/examples/restful/webspicy/formaldef/todo/_one/get.yml +0 -50
  91. data/examples/restful/webspicy/formaldef/todo/_one/patch.yml +0 -66
  92. data/examples/restful/webspicy/formaldef/todo/_one/put.yml +0 -65
  93. data/examples/restful/webspicy/formaldef/todo/get.yml +0 -36
  94. data/examples/restful/webspicy/formaldef/todo/options.yml +0 -32
  95. data/examples/restful/webspicy/formaldef/todo/post.csv.yml +0 -43
  96. data/examples/restful/webspicy/formaldef/todo/post.file.yml +0 -40
  97. data/examples/restful/webspicy/formaldef/todo/post.yml +0 -51
  98. data/examples/restful/webspicy/formaldef/todo/todos.csv +0 -4
  99. data/examples/restful/webspicy/rack.rb +0 -7
  100. data/examples/restful/webspicy/real.rb +0 -8
  101. data/examples/restful/webspicy/schema.fio +0 -20
  102. data/examples/restful/webspicy/support/must_be_an_admin.rb +0 -20
  103. data/examples/restful/webspicy/support/must_be_authenticated.rb +0 -48
  104. data/examples/restful/webspicy/support/todo_not_removed.rb +0 -21
  105. data/examples/restful/webspicy/support/todo_removed.rb +0 -20
  106. data/examples/single_spec/spec.yml +0 -59
  107. data/examples/website/config.rb +0 -2
  108. data/examples/website/schema.fio +0 -1
  109. data/examples/website/specification/get-http.yml +0 -30
  110. data/examples/website/specification/get-https.yml +0 -30
  111. data/lib/webspicy/checker.rb +0 -10
  112. data/lib/webspicy/mocker.rb +0 -88
  113. data/lib/webspicy/openapi/generator.rb +0 -127
  114. data/lib/webspicy/rspec/checker.rb +0 -2
  115. data/lib/webspicy/rspec/checker/rspec_checker.rb +0 -24
  116. data/lib/webspicy/rspec/support/rspec_runnable.rb +0 -27
  117. data/lib/webspicy/rspec/tester.rb +0 -4
  118. data/lib/webspicy/rspec/tester/rspec_asserter.rb +0 -121
  119. data/lib/webspicy/rspec/tester/rspec_matchers.rb +0 -114
  120. data/lib/webspicy/rspec/tester/rspec_tester.rb +0 -63
  121. data/spec/unit/mocker/test_mocker.rb +0 -32
  122. data/spec/unit/openapi/test_generator.rb +0 -28
@@ -0,0 +1,8 @@
1
+ [
2
+ {
3
+ "name": "foo"
4
+ },
5
+ {
6
+ "name": "bar"
7
+ }
8
+ ]
@@ -0,0 +1 @@
1
+ Webspicy::SpecTests::Queue.new
@@ -0,0 +1,11 @@
1
+ {
2
+ "id": 1,
3
+ "name": "single",
4
+ "version": {
5
+ "major": "1",
6
+ "minor": "0"
7
+ },
8
+ "hobbies": [
9
+ { "name": "programming"}
10
+ ]
11
+ }
@@ -0,0 +1,3 @@
1
+ ---
2
+ id: 3
3
+ name: 'YAML'
@@ -0,0 +1,56 @@
1
+ require 'spec_helper'
2
+
3
+ module Webspicy
4
+ module SpecTests
5
+ class Queue
6
+ include Webspicy::Support::World::Item
7
+
8
+ end
9
+ end
10
+ end
11
+
12
+ module Webspicy
13
+ module Support
14
+ describe World do
15
+
16
+ let(:config){
17
+ Configuration.new(restful_folder)
18
+ }
19
+
20
+ subject do
21
+ World.new Path.dir/"fixtures", config
22
+ end
23
+
24
+ it 'supports single objects' do
25
+ expect(subject.single.name).to eql("single")
26
+ expect(subject.single.version.minor).to eql("0")
27
+ expect(subject.single.hobbies[0].name).to eql("programming")
28
+ end
29
+
30
+ it 'supports yaml too' do
31
+ expect(subject.yaml.name).to eql("YAML")
32
+ end
33
+
34
+ it 'supports arrays' do
35
+ expect(subject.array[0].name).to eql("foo")
36
+ expect(subject.array[1].name).to eql("bar")
37
+ end
38
+
39
+ it 'allows setting new attributes on itself' do
40
+ subject.foo = "bar"
41
+ expect(subject.foo).to eql("bar")
42
+ end
43
+
44
+ it 'allows setting new attributes on existing objects' do
45
+ subject.single.foo = "bar"
46
+ expect(subject.single.foo).to eql("bar")
47
+ end
48
+
49
+ it 'supports ruby files and evaluates them' do
50
+ q = subject.queue
51
+ expect(q).to be_a(Webspicy::SpecTests::Queue)
52
+ expect(q.config).to be(config)
53
+ end
54
+ end
55
+ end
56
+ end
@@ -48,6 +48,11 @@ module Webspicy
48
48
  expect(c.each_scope.to_a.first.each_specification.to_a.size).to eql(1)
49
49
  end
50
50
 
51
+ it 'exposes the world as a World instance' do
52
+ c = Configuration.dress(restful_folder)
53
+ expect(c.world).to be_a(Support::World)
54
+ end
55
+
51
56
  it 'yields the block with the configuration, if given' do
52
57
  seen = nil
53
58
  Configuration.dress(Path.dir/'configuration'){|c|
@@ -106,6 +111,7 @@ module Webspicy
106
111
  ENV['ROBUST'] = 'yes'
107
112
  config = Configuration.new
108
113
  expect(config.run_counterexamples?).to eql(true)
114
+ ENV.delete('ROBUST')
109
115
  end
110
116
 
111
117
  it 'ignores the environment is set explicitly' do
@@ -114,6 +120,7 @@ module Webspicy
114
120
  c.run_counterexamples = false
115
121
  end
116
122
  expect(config.run_counterexamples?).to eql(false)
123
+ ENV.delete('ROBUST')
117
124
  end
118
125
  end
119
126
 
@@ -130,6 +137,7 @@ module Webspicy
130
137
  expect(config.file_filter).to be_a(Regexp)
131
138
  expect(config.file_filter).to match("foo/bar/getTodo.yml")
132
139
  expect(config.file_filter).not_to match("foo/bar/getTodos.yml")
140
+ ENV.delete('RESOURCE')
133
141
  end
134
142
 
135
143
  it 'allows expressing a no match' do
@@ -138,6 +146,7 @@ module Webspicy
138
146
  expect(config.file_filter).to be_a(Proc)
139
147
  expect(config.file_filter.call("foo/bar/getTodos.yml")).to eq(true)
140
148
  expect(config.file_filter.call("foo/bar/getTodo.yml")).to eq(false)
149
+ ENV.delete('RESOURCE')
141
150
  end
142
151
 
143
152
  it 'ignores the environment if set explicitly' do
@@ -146,6 +155,7 @@ module Webspicy
146
155
  c.file_filter = nil
147
156
  end
148
157
  expect(config.file_filter).to be_nil
158
+ ENV.delete('RESOURCE')
149
159
  end
150
160
  end
151
161
 
@@ -160,6 +170,7 @@ module Webspicy
160
170
  ENV['METHOD'] = 'GET'
161
171
  config = Configuration.new
162
172
  expect(config.service_filter).to be_a(Proc)
173
+ ENV.delete('METHOD')
163
174
  end
164
175
 
165
176
  it 'ignores the environment is set explicitly' do
@@ -168,6 +179,36 @@ module Webspicy
168
179
  c.service_filter = nil
169
180
  end
170
181
  expect(config.service_filter).to be_nil
182
+ ENV.delete('METHOD')
183
+ end
184
+ end
185
+
186
+ describe 'insecure' do
187
+
188
+ it 'is false by default' do
189
+ config = Configuration.new
190
+ expect(config.insecure).to eql(false)
191
+ end
192
+
193
+ it 'is true if INSECURE is set to yes' do
194
+ ENV['INSECURE'] = 'yes'
195
+ config = Configuration.new
196
+ expect(config.insecure).to eql(true)
197
+ ENV.delete('INSECURE')
198
+ end
199
+
200
+ it 'is true if INSECURE is set to 1' do
201
+ ENV['INSECURE'] = '1'
202
+ config = Configuration.new
203
+ expect(config.insecure).to eql(true)
204
+ ENV.delete('INSECURE')
205
+ end
206
+
207
+ it 'is false if INSECURE is set to no' do
208
+ ENV['INSECURE'] = 'no'
209
+ config = Configuration.new
210
+ expect(config.insecure).to eql(false)
211
+ ENV.delete('INSECURE')
171
212
  end
172
213
  end
173
214
 
@@ -187,48 +228,56 @@ module Webspicy
187
228
  ENV['TAG'] = 'foo'
188
229
  expect(subject).to be_a(Proc)
189
230
  expect(subject.call(tc)).to eql(true)
231
+ ENV.delete('TAG')
190
232
  end
191
233
 
192
234
  it 'allows no matching a single tag' do
193
235
  ENV['TAG'] = 'baz'
194
236
  expect(subject).to be_a(Proc)
195
237
  expect(subject.call(tc)).to eql(false)
238
+ ENV.delete('TAG')
196
239
  end
197
240
 
198
241
  it 'allows setting multiple tags' do
199
242
  ENV['TAG'] = 'foo,baz'
200
243
  expect(subject).to be_a(Proc)
201
244
  expect(subject.call(tc)).to eql(true)
245
+ ENV.delete('TAG')
202
246
  end
203
247
 
204
248
  it 'allows no matching any of multiple tags' do
205
249
  ENV['TAG'] = 'foi,baz'
206
250
  expect(subject).to be_a(Proc)
207
251
  expect(subject.call(tc)).to eql(false)
252
+ ENV.delete('TAG')
208
253
  end
209
254
 
210
255
  it 'allows setting a single negative tag' do
211
256
  ENV['TAG'] = '!foo'
212
257
  expect(subject).to be_a(Proc)
213
258
  expect(subject.call(tc)).to eql(false)
259
+ ENV.delete('TAG')
214
260
  end
215
261
 
216
262
  it 'allows not matching a single negative tag' do
217
263
  ENV['TAG'] = '!baz'
218
264
  expect(subject).to be_a(Proc)
219
265
  expect(subject.call(tc)).to eql(true)
266
+ ENV.delete('TAG')
220
267
  end
221
268
 
222
269
  it 'allows mixing positive & negative tags and have a match' do
223
270
  ENV['TAG'] = 'foo,!baz'
224
271
  expect(subject).to be_a(Proc)
225
272
  expect(subject.call(tc)).to eql(true)
273
+ ENV.delete('TAG')
226
274
  end
227
275
 
228
276
  it 'allows mixing positive & negative tags and have no match' do
229
277
  ENV['TAG'] = 'foo,!bar'
230
278
  expect(subject).to be_a(Proc)
231
279
  expect(subject.call(tc)).to eql(false)
280
+ ENV.delete('TAG')
232
281
  end
233
282
 
234
283
  end
@@ -0,0 +1,40 @@
1
+ require 'spec_helper'
2
+ require 'webspicy/tester/fakeses'
3
+ module Webspicy
4
+ class Tester
5
+ class Fakeses
6
+ describe Email do
7
+
8
+ DATA = Base64.encode64 <<~J
9
+ From: Webspicy <noreply@webspicy.io>
10
+ To: someone@world.com
11
+ Subject: Hey world, hello!
12
+ J
13
+
14
+ DATA = JSON.parse <<~J
15
+ {
16
+ "id": "1782605f-da34-9c02-6a38-d7e101029cbf",
17
+ "body": {
18
+ "Source": "noreply@webspicy.io",
19
+ "Destinations.member.1": "someone@world.com",
20
+ "RawMessage.Data": "#{DATA.gsub /\n/, ''}",
21
+ "Action": "SendRawEmail",
22
+ "Version": "2010-12-01"
23
+ }
24
+ }
25
+ J
26
+
27
+ subject{
28
+ Email.new(DATA)
29
+ }
30
+
31
+ it 'works as expected' do
32
+ expect(subject.from).to eql("noreply@webspicy.io")
33
+ expect(subject.to).to eql(["someone@world.com"])
34
+ expect(subject.subject).to eql("Hey world, hello!")
35
+ end
36
+
37
+ end
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,35 @@
1
+ require 'spec_helper'
2
+ require 'rack/test'
3
+ require 'webspicy/web'
4
+ require 'webspicy/web/mocker'
5
+ module Webspicy
6
+ module Web
7
+ describe Mocker do
8
+ include Rack::Test::Methods
9
+
10
+ let(:app) {
11
+ Mocker.new(Configuration.dress(restful_folder))
12
+ }
13
+
14
+ it 'works as expected' do
15
+ get '/todo/'
16
+ expect(last_response.status).to eql(200)
17
+ expect(last_response.body).not_to be_empty
18
+ end
19
+
20
+ it 'supports CORS on OPTIONS' do
21
+ options '/todo/'
22
+ expect(last_response.status).to eql(204)
23
+ expect(last_response.body).to be_empty
24
+ end
25
+
26
+ it 'returns the correct status code, taken from first example' do
27
+ delete '/todo/1'
28
+ expect(last_response.status).to eql(204)
29
+ expect(last_response.body).to be_empty
30
+ expect(last_response["Content-Type"]).to be_nil
31
+ end
32
+
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+ require 'webspicy/web'
3
+ require 'webspicy/web/openapi'
4
+ require 'openapi3_parser'
5
+ module Webspicy
6
+ module Web
7
+ module Openapi
8
+ describe Generator do
9
+
10
+ let(:config) {
11
+ Configuration.new(restful_folder)
12
+ }
13
+
14
+ subject {
15
+ ruby_objs = Generator.new(config).call
16
+ JSON.parse(ruby_objs.to_json)
17
+ }
18
+
19
+ it 'works fine' do
20
+ document = Openapi3Parser.load(subject)
21
+ #puts JSON.pretty_generate(subject)
22
+ document.errors.each do |err|
23
+ puts err.inspect
24
+ end unless document.errors.empty?
25
+ expect(document.errors).to be_empty
26
+ end
27
+
28
+ end
29
+ end
30
+ end
31
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webspicy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.0
4
+ version: 0.20.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-23 00:00:00.000000000 Z
11
+ date: 2021-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -45,7 +45,7 @@ dependencies:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '3.10'
48
- type: :runtime
48
+ type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
@@ -59,7 +59,7 @@ dependencies:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 0.4.1
62
- type: :runtime
62
+ type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
@@ -126,22 +126,22 @@ dependencies:
126
126
  name: rack-robustness
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - "~>"
130
- - !ruby/object:Gem::Version
131
- version: '1.1'
132
129
  - - ">="
133
130
  - !ruby/object:Gem::Version
134
131
  version: 1.1.0
132
+ - - "~>"
133
+ - !ruby/object:Gem::Version
134
+ version: '1.1'
135
135
  type: :runtime
136
136
  prerelease: false
137
137
  version_requirements: !ruby/object:Gem::Requirement
138
138
  requirements:
139
- - - "~>"
140
- - !ruby/object:Gem::Version
141
- version: '1.1'
142
139
  - - ">="
143
140
  - !ruby/object:Gem::Version
144
141
  version: 1.1.0
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '1.1'
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: mustermann
147
147
  requirement: !ruby/object:Gem::Requirement
@@ -209,100 +209,115 @@ files:
209
209
  - README.md
210
210
  - Rakefile
211
211
  - bin/webspicy
212
- - examples/restful/Gemfile
213
- - examples/restful/Rakefile
214
- - examples/restful/app.rb
215
- - examples/restful/webspicy/config.rb
216
- - examples/restful/webspicy/formaldef/todo/_one/delete.yml
217
- - examples/restful/webspicy/formaldef/todo/_one/get.simpler.yml
218
- - examples/restful/webspicy/formaldef/todo/_one/get.yml
219
- - examples/restful/webspicy/formaldef/todo/_one/patch.yml
220
- - examples/restful/webspicy/formaldef/todo/_one/put.yml
221
- - examples/restful/webspicy/formaldef/todo/get.yml
222
- - examples/restful/webspicy/formaldef/todo/options.yml
223
- - examples/restful/webspicy/formaldef/todo/post.csv.yml
224
- - examples/restful/webspicy/formaldef/todo/post.file.yml
225
- - examples/restful/webspicy/formaldef/todo/post.yml
226
- - examples/restful/webspicy/formaldef/todo/todos.csv
227
- - examples/restful/webspicy/rack.rb
228
- - examples/restful/webspicy/real.rb
229
- - examples/restful/webspicy/schema.fio
230
- - examples/restful/webspicy/support/must_be_an_admin.rb
231
- - examples/restful/webspicy/support/must_be_authenticated.rb
232
- - examples/restful/webspicy/support/todo_not_removed.rb
233
- - examples/restful/webspicy/support/todo_removed.rb
234
- - examples/single_spec/spec.yml
235
- - examples/website/config.rb
236
- - examples/website/schema.fio
237
- - examples/website/specification/get-http.yml
238
- - examples/website/specification/get-https.yml
212
+ - doc/1-black-box-scene.md
213
+ - doc/2-black-box-testing.md
214
+ - doc/3-specification-importance.md
215
+ - doc/4-sequence-diagram.md
239
216
  - lib/finitio/webspicy/scalars.fio
240
217
  - lib/webspicy.rb
241
- - lib/webspicy/checker.rb
242
218
  - lib/webspicy/configuration.rb
243
219
  - lib/webspicy/configuration/scope.rb
244
220
  - lib/webspicy/configuration/single_url.rb
245
221
  - lib/webspicy/configuration/single_yml_file.rb
246
222
  - lib/webspicy/formaldoc.fio
247
- - lib/webspicy/mocker.rb
248
- - lib/webspicy/mocker/config.ru
249
- - lib/webspicy/openapi.rb
250
- - lib/webspicy/openapi/generator.rb
251
- - lib/webspicy/rspec/checker.rb
252
- - lib/webspicy/rspec/checker/rspec_checker.rb
253
- - lib/webspicy/rspec/support/rspec_runnable.rb
254
- - lib/webspicy/rspec/tester.rb
255
- - lib/webspicy/rspec/tester/rspec_asserter.rb
256
- - lib/webspicy/rspec/tester/rspec_matchers.rb
257
- - lib/webspicy/rspec/tester/rspec_tester.rb
258
223
  - lib/webspicy/specification.rb
259
- - lib/webspicy/specification/errcondition.rb
224
+ - lib/webspicy/specification/condition.rb
225
+ - lib/webspicy/specification/err.rb
260
226
  - lib/webspicy/specification/file_upload.rb
261
- - lib/webspicy/specification/postcondition.rb
262
- - lib/webspicy/specification/precondition.rb
263
- - lib/webspicy/specification/precondition/global_request_headers.rb
264
- - lib/webspicy/specification/precondition/robust_to_invalid_input.rb
227
+ - lib/webspicy/specification/oldies.rb
228
+ - lib/webspicy/specification/oldies/bridge.rb
229
+ - lib/webspicy/specification/oldies/errcondition.rb
230
+ - lib/webspicy/specification/oldies/postcondition.rb
231
+ - lib/webspicy/specification/oldies/precondition.rb
232
+ - lib/webspicy/specification/post.rb
233
+ - lib/webspicy/specification/post/missing_condition_impl.rb
234
+ - lib/webspicy/specification/post/unexpected_condition_impl.rb
235
+ - lib/webspicy/specification/pre.rb
236
+ - lib/webspicy/specification/pre/global_request_headers.rb
237
+ - lib/webspicy/specification/pre/robust_to_invalid_input.rb
265
238
  - lib/webspicy/specification/service.rb
266
239
  - lib/webspicy/specification/test_case.rb
267
240
  - lib/webspicy/support.rb
268
241
  - lib/webspicy/support/colorize.rb
269
242
  - lib/webspicy/support/data_object.rb
243
+ - lib/webspicy/support/hooks.rb
270
244
  - lib/webspicy/support/status_range.rb
245
+ - lib/webspicy/support/world.rb
271
246
  - lib/webspicy/tester.rb
272
247
  - lib/webspicy/tester/asserter.rb
273
248
  - lib/webspicy/tester/assertions.rb
274
249
  - lib/webspicy/tester/client.rb
275
- - lib/webspicy/tester/client/http_client.rb
276
- - lib/webspicy/tester/client/rack_test_client.rb
277
- - lib/webspicy/tester/client/support.rb
278
250
  - lib/webspicy/tester/failure.rb
251
+ - lib/webspicy/tester/fakeses.rb
252
+ - lib/webspicy/tester/fakeses/email.rb
253
+ - lib/webspicy/tester/fakesmtp.rb
254
+ - lib/webspicy/tester/fakesmtp/email.rb
255
+ - lib/webspicy/tester/file_checker.rb
279
256
  - lib/webspicy/tester/invocation.rb
257
+ - lib/webspicy/tester/reporter.rb
258
+ - lib/webspicy/tester/reporter/composite.rb
259
+ - lib/webspicy/tester/reporter/documentation.rb
260
+ - lib/webspicy/tester/reporter/error_count.rb
261
+ - lib/webspicy/tester/reporter/exceptions.rb
262
+ - lib/webspicy/tester/reporter/file_progress.rb
263
+ - lib/webspicy/tester/reporter/file_summary.rb
264
+ - lib/webspicy/tester/reporter/progress.rb
265
+ - lib/webspicy/tester/reporter/summary.rb
266
+ - lib/webspicy/tester/result.rb
267
+ - lib/webspicy/tester/result/assert_met.rb
268
+ - lib/webspicy/tester/result/check.rb
269
+ - lib/webspicy/tester/result/errcondition_met.rb
270
+ - lib/webspicy/tester/result/error_schema_met.rb
271
+ - lib/webspicy/tester/result/invocation_succeeded.rb
272
+ - lib/webspicy/tester/result/output_schema_met.rb
273
+ - lib/webspicy/tester/result/postcondition_met.rb
274
+ - lib/webspicy/tester/result/response_header_met.rb
275
+ - lib/webspicy/tester/result/response_status_met.rb
280
276
  - lib/webspicy/version.rb
277
+ - lib/webspicy/web.rb
278
+ - lib/webspicy/web/client.rb
279
+ - lib/webspicy/web/client/http_client.rb
280
+ - lib/webspicy/web/client/rack_test_client.rb
281
+ - lib/webspicy/web/client/support.rb
282
+ - lib/webspicy/web/invocation.rb
283
+ - lib/webspicy/web/mocker.rb
284
+ - lib/webspicy/web/mocker/config.ru
285
+ - lib/webspicy/web/openapi.rb
286
+ - lib/webspicy/web/openapi/generator.rb
281
287
  - spec/spec_helper.rb
282
288
  - spec/unit/configuration/config.rb
283
289
  - spec/unit/configuration/scope/test_each_service.rb
284
290
  - spec/unit/configuration/scope/test_each_specification.rb
285
291
  - spec/unit/configuration/scope/test_expand_example.rb
286
292
  - spec/unit/configuration/scope/test_to_real_url.rb
287
- - spec/unit/mocker/test_mocker.rb
288
- - spec/unit/openapi/test_generator.rb
289
- - spec/unit/specification/precondition/test_global_request_headers.rb
293
+ - spec/unit/specification/pre/test_global_request_headers.rb
290
294
  - spec/unit/specification/service/test_dress_params.rb
291
295
  - spec/unit/specification/test_case/test_mutate.rb
296
+ - spec/unit/specification/test_condition.rb
292
297
  - spec/unit/specification/test_instantiate_url.rb
293
298
  - spec/unit/specification/test_url_placeholders.rb
299
+ - spec/unit/support/hooks/test_fire_after_each.rb
300
+ - spec/unit/support/hooks/test_fire_around.rb
301
+ - spec/unit/support/hooks/test_fire_before_each.rb
294
302
  - spec/unit/support/test_status_range.rb
303
+ - spec/unit/support/world/fixtures/array.json
304
+ - spec/unit/support/world/fixtures/queue.rb
305
+ - spec/unit/support/world/fixtures/single.json
306
+ - spec/unit/support/world/fixtures/yaml.yml
307
+ - spec/unit/support/world/test_world.rb
295
308
  - spec/unit/test_configuration.rb
296
- - spec/unit/tester/client/test_around.rb
309
+ - spec/unit/tester/fakeses/test_email.rb
297
310
  - spec/unit/tester/test_asserter.rb
298
311
  - spec/unit/tester/test_assertions.rb
312
+ - spec/unit/web/mocker/test_mocker.rb
313
+ - spec/unit/web/openapi/test_generator.rb
299
314
  - tasks/gem.rake
300
315
  - tasks/test.rake
301
316
  homepage: http://github.com/enspirit/webspicy
302
317
  licenses:
303
318
  - MIT
304
319
  metadata: {}
305
- post_install_message:
320
+ post_install_message:
306
321
  rdoc_options: []
307
322
  require_paths:
308
323
  - lib
@@ -317,8 +332,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
317
332
  - !ruby/object:Gem::Version
318
333
  version: '0'
319
334
  requirements: []
320
- rubygems_version: 3.1.2
321
- signing_key:
335
+ rubygems_version: 3.0.8
336
+ signing_key:
322
337
  specification_version: 4
323
338
  summary: Webspicy helps testing web services as software operation black boxes!
324
339
  test_files: []