webspicy 0.16.3 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -3
  3. data/examples/restful/Gemfile.lock +14 -13
  4. data/examples/restful/webspicy/config.rb +1 -0
  5. data/examples/restful/webspicy/{todo/deleteTodo.yml → formaldef/todo/_one/delete.yml} +3 -0
  6. data/examples/restful/webspicy/{todo/getTodoSingleServiceFormat.yml → formaldef/todo/_one/get.simpler.yml} +0 -0
  7. data/examples/restful/webspicy/{todo/getTodo.yml → formaldef/todo/_one/get.yml} +0 -0
  8. data/examples/restful/webspicy/{todo/patchTodo.yml → formaldef/todo/_one/patch.yml} +0 -0
  9. data/examples/restful/webspicy/{todo/putTodo.yml → formaldef/todo/_one/put.yml} +0 -0
  10. data/examples/restful/webspicy/{todo/getTodos.yml → formaldef/todo/get.yml} +0 -0
  11. data/examples/restful/webspicy/{todo → formaldef/todo}/options.yml +0 -0
  12. data/examples/restful/webspicy/{todo/postCsv.yml → formaldef/todo/post.csv.yml} +0 -0
  13. data/examples/restful/webspicy/{todo/postFile.yml → formaldef/todo/post.file.yml} +0 -0
  14. data/examples/restful/webspicy/{todo/postTodos.yml → formaldef/todo/post.yml} +0 -0
  15. data/examples/restful/webspicy/{todo → formaldef/todo}/todos.csv +0 -0
  16. data/examples/restful/webspicy/support/todo_not_removed.rb +21 -0
  17. data/examples/restful/webspicy/support/todo_removed.rb +5 -3
  18. data/lib/webspicy.rb +1 -0
  19. data/lib/webspicy/checker.rb +5 -20
  20. data/lib/webspicy/configuration.rb +9 -0
  21. data/lib/webspicy/configuration/scope.rb +0 -8
  22. data/lib/webspicy/formaldoc.fio +2 -0
  23. data/lib/webspicy/rspec/checker.rb +2 -0
  24. data/lib/webspicy/rspec/checker/rspec_checker.rb +24 -0
  25. data/lib/webspicy/rspec/support/rspec_runnable.rb +27 -0
  26. data/lib/webspicy/rspec/tester.rb +4 -0
  27. data/lib/webspicy/{tester → rspec/tester}/rspec_asserter.rb +23 -10
  28. data/lib/webspicy/{tester → rspec/tester}/rspec_matchers.rb +10 -0
  29. data/lib/webspicy/rspec/tester/rspec_tester.rb +63 -0
  30. data/lib/webspicy/specification.rb +5 -7
  31. data/lib/webspicy/specification/errcondition.rb +16 -0
  32. data/lib/webspicy/specification/service.rb +27 -19
  33. data/lib/webspicy/specification/test_case.rb +3 -9
  34. data/lib/webspicy/support.rb +1 -0
  35. data/lib/webspicy/support/data_object.rb +25 -0
  36. data/lib/webspicy/tester.rb +4 -78
  37. data/lib/webspicy/tester/asserter.rb +9 -4
  38. data/lib/webspicy/tester/assertions.rb +8 -9
  39. data/lib/webspicy/tester/failure.rb +6 -0
  40. data/lib/webspicy/tester/invocation.rb +8 -156
  41. data/lib/webspicy/version.rb +2 -2
  42. data/spec/unit/configuration/scope/test_each_service.rb +2 -2
  43. data/spec/unit/configuration/scope/test_each_specification.rb +7 -7
  44. data/spec/unit/test_configuration.rb +1 -1
  45. data/spec/unit/tester/test_asserter.rb +198 -3
  46. data/spec/unit/tester/test_assertions.rb +8 -6
  47. metadata +27 -18
@@ -96,14 +96,16 @@ module Webspicy
96
96
  { id: 1, bar: "bar" },
97
97
  { id: 2, bar: "baz" }
98
98
  ] }
99
- expect(idFD(target, 'foo', 1, bar: "bar")).to be(true)
100
- expect(idFD(target, 'foo', 1, bar: "baz")).to be(false)
101
- expect(idFD(target, 'foo', 1, baz: "boz")).to be(false)
99
+ element = element_with_id(target, 'foo', 1)
100
+ expect(idFD(element, bar: "bar")).to be(true)
101
+ expect(idFD(element, bar: "baz")).to be(false)
102
+ expect(idFD(element, baz: "boz")).to be(false)
102
103
 
103
104
  target = { foo: { id: 1, bar: "bar" } }
104
- expect(idFD(target, 'foo', 1, bar: "bar")).to be(true)
105
- expect(idFD(target, 'foo', 1, bar: "baz")).to be(false)
106
- expect(idFD(target, 'foo', 1, baz: "boz")).to be(false)
105
+ element = element_with_id(target, 'foo', 1)
106
+ expect(idFD(element, bar: "bar")).to be(true)
107
+ expect(idFD(element, bar: "baz")).to be(false)
108
+ expect(idFD(element, baz: "boz")).to be(false)
107
109
  end
108
110
 
109
111
  it 'has a pathFD assertion' do
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.16.3
4
+ version: 0.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bernard Lambeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-18 00:00:00.000000000 Z
11
+ date: 2021-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '3.7'
47
+ version: '3.10'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '3.7'
54
+ version: '3.10'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec_junit_formatter
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -214,23 +214,24 @@ files:
214
214
  - examples/restful/Rakefile
215
215
  - examples/restful/app.rb
216
216
  - examples/restful/webspicy/config.rb
217
+ - examples/restful/webspicy/formaldef/todo/_one/delete.yml
218
+ - examples/restful/webspicy/formaldef/todo/_one/get.simpler.yml
219
+ - examples/restful/webspicy/formaldef/todo/_one/get.yml
220
+ - examples/restful/webspicy/formaldef/todo/_one/patch.yml
221
+ - examples/restful/webspicy/formaldef/todo/_one/put.yml
222
+ - examples/restful/webspicy/formaldef/todo/get.yml
223
+ - examples/restful/webspicy/formaldef/todo/options.yml
224
+ - examples/restful/webspicy/formaldef/todo/post.csv.yml
225
+ - examples/restful/webspicy/formaldef/todo/post.file.yml
226
+ - examples/restful/webspicy/formaldef/todo/post.yml
227
+ - examples/restful/webspicy/formaldef/todo/todos.csv
217
228
  - examples/restful/webspicy/rack.rb
218
229
  - examples/restful/webspicy/real.rb
219
230
  - examples/restful/webspicy/schema.fio
220
231
  - examples/restful/webspicy/support/must_be_an_admin.rb
221
232
  - examples/restful/webspicy/support/must_be_authenticated.rb
233
+ - examples/restful/webspicy/support/todo_not_removed.rb
222
234
  - examples/restful/webspicy/support/todo_removed.rb
223
- - examples/restful/webspicy/todo/deleteTodo.yml
224
- - examples/restful/webspicy/todo/getTodo.yml
225
- - examples/restful/webspicy/todo/getTodoSingleServiceFormat.yml
226
- - examples/restful/webspicy/todo/getTodos.yml
227
- - examples/restful/webspicy/todo/options.yml
228
- - examples/restful/webspicy/todo/patchTodo.yml
229
- - examples/restful/webspicy/todo/postCsv.yml
230
- - examples/restful/webspicy/todo/postFile.yml
231
- - examples/restful/webspicy/todo/postTodos.yml
232
- - examples/restful/webspicy/todo/putTodo.yml
233
- - examples/restful/webspicy/todo/todos.csv
234
235
  - examples/single_spec/spec.yml
235
236
  - examples/website/config.rb
236
237
  - examples/website/schema.fio
@@ -248,7 +249,15 @@ files:
248
249
  - lib/webspicy/mocker/config.ru
249
250
  - lib/webspicy/openapi.rb
250
251
  - lib/webspicy/openapi/generator.rb
252
+ - lib/webspicy/rspec/checker.rb
253
+ - lib/webspicy/rspec/checker/rspec_checker.rb
254
+ - lib/webspicy/rspec/support/rspec_runnable.rb
255
+ - lib/webspicy/rspec/tester.rb
256
+ - lib/webspicy/rspec/tester/rspec_asserter.rb
257
+ - lib/webspicy/rspec/tester/rspec_matchers.rb
258
+ - lib/webspicy/rspec/tester/rspec_tester.rb
251
259
  - lib/webspicy/specification.rb
260
+ - lib/webspicy/specification/errcondition.rb
252
261
  - lib/webspicy/specification/file_upload.rb
253
262
  - lib/webspicy/specification/postcondition.rb
254
263
  - lib/webspicy/specification/precondition.rb
@@ -258,6 +267,7 @@ files:
258
267
  - lib/webspicy/specification/test_case.rb
259
268
  - lib/webspicy/support.rb
260
269
  - lib/webspicy/support/colorize.rb
270
+ - lib/webspicy/support/data_object.rb
261
271
  - lib/webspicy/support/status_range.rb
262
272
  - lib/webspicy/tester.rb
263
273
  - lib/webspicy/tester/asserter.rb
@@ -266,9 +276,8 @@ files:
266
276
  - lib/webspicy/tester/client/http_client.rb
267
277
  - lib/webspicy/tester/client/rack_test_client.rb
268
278
  - lib/webspicy/tester/client/support.rb
279
+ - lib/webspicy/tester/failure.rb
269
280
  - lib/webspicy/tester/invocation.rb
270
- - lib/webspicy/tester/rspec_asserter.rb
271
- - lib/webspicy/tester/rspec_matchers.rb
272
281
  - lib/webspicy/version.rb
273
282
  - spec/spec_helper.rb
274
283
  - spec/unit/configuration/config.rb
@@ -309,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
309
318
  - !ruby/object:Gem::Version
310
319
  version: '0'
311
320
  requirements: []
312
- rubygems_version: 3.1.2
321
+ rubygems_version: 3.1.4
313
322
  signing_key:
314
323
  specification_version: 4
315
324
  summary: Webspicy helps testing web services as software operation black boxes!