serverspec-extra-types 0.1.3 → 0.1.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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -1
  3. data/Gemfile +2 -0
  4. data/Rakefile +2 -0
  5. data/bin/console +1 -0
  6. data/lib/serverspec_extra_types/helpers/properties.rb +2 -0
  7. data/lib/serverspec_extra_types/matchers/be_a_manager_node.rb +2 -0
  8. data/lib/serverspec_extra_types/matchers/be_a_worker_node.rb +2 -0
  9. data/lib/serverspec_extra_types/matchers/be_active.rb +2 -0
  10. data/lib/serverspec_extra_types/matchers/configure_queue.rb +2 -0
  11. data/lib/serverspec_extra_types/matchers/have_count.rb +2 -0
  12. data/lib/serverspec_extra_types/matchers/have_domain_name.rb +2 -0
  13. data/lib/serverspec_extra_types/matchers/have_engine_version.rb +2 -0
  14. data/lib/serverspec_extra_types/matchers/have_environment_variable.rb +2 -0
  15. data/lib/serverspec_extra_types/matchers/have_ha_mode.rb +2 -0
  16. data/lib/serverspec_extra_types/matchers/have_ha_nodes.rb +2 -0
  17. data/lib/serverspec_extra_types/matchers/have_ha_sync_mode.rb +2 -0
  18. data/lib/serverspec_extra_types/matchers/have_host.rb +2 -0
  19. data/lib/serverspec_extra_types/matchers/have_hostname.rb +2 -0
  20. data/lib/serverspec_extra_types/matchers/have_image.rb +2 -0
  21. data/lib/serverspec_extra_types/matchers/have_image_sha.rb +2 -0
  22. data/lib/serverspec_extra_types/matchers/have_label.rb +4 -2
  23. data/lib/serverspec_extra_types/matchers/have_mount.rb +2 -0
  24. data/lib/serverspec_extra_types/matchers/have_network.rb +2 -0
  25. data/lib/serverspec_extra_types/matchers/have_placement_constraint.rb +2 -0
  26. data/lib/serverspec_extra_types/matchers/have_replica_count.rb +2 -0
  27. data/lib/serverspec_extra_types/matchers/have_restart_limit.rb +2 -0
  28. data/lib/serverspec_extra_types/matchers/have_restart_policy.rb +2 -0
  29. data/lib/serverspec_extra_types/matchers/have_user.rb +2 -0
  30. data/lib/serverspec_extra_types/matchers/have_vhost.rb +2 -0
  31. data/lib/serverspec_extra_types/matchers/http_1xx.rb +109 -0
  32. data/lib/serverspec_extra_types/matchers/http_2xx.rb +361 -0
  33. data/lib/serverspec_extra_types/matchers/http_3xx.rb +289 -0
  34. data/lib/serverspec_extra_types/matchers/http_4xx.rb +1081 -0
  35. data/lib/serverspec_extra_types/matchers/http_5xx.rb +433 -0
  36. data/lib/serverspec_extra_types/matchers/include_regex.rb +2 -0
  37. data/lib/serverspec_extra_types/matchers/map_port.rb +2 -0
  38. data/lib/serverspec_extra_types/matchers/mirror_all.rb +2 -0
  39. data/lib/serverspec_extra_types/matchers/publish_all_ports.rb +2 -0
  40. data/lib/serverspec_extra_types/matchers/read_from_queue.rb +2 -0
  41. data/lib/serverspec_extra_types/matchers/url_matchers.rb +7 -0
  42. data/lib/serverspec_extra_types/matchers/write_to_queue.rb +2 -0
  43. data/lib/serverspec_extra_types/matchers.rb +4 -0
  44. data/lib/serverspec_extra_types/types/api_base.rb +2 -0
  45. data/lib/serverspec_extra_types/types/consul_base.rb +2 -0
  46. data/lib/serverspec_extra_types/types/consul_node.rb +2 -0
  47. data/lib/serverspec_extra_types/types/consul_node_list.rb +2 -0
  48. data/lib/serverspec_extra_types/types/consul_service.rb +2 -0
  49. data/lib/serverspec_extra_types/types/consul_service_list.rb +2 -0
  50. data/lib/serverspec_extra_types/types/curl.rb +69 -0
  51. data/lib/serverspec_extra_types/types/docker_container.rb +2 -0
  52. data/lib/serverspec_extra_types/types/docker_network.rb +2 -2
  53. data/lib/serverspec_extra_types/types/docker_node.rb +2 -0
  54. data/lib/serverspec_extra_types/types/docker_service.rb +2 -0
  55. data/lib/serverspec_extra_types/types/rabbitmq_base.rb +2 -0
  56. data/lib/serverspec_extra_types/types/rabbitmq_node_list.rb +2 -0
  57. data/lib/serverspec_extra_types/types/rabbitmq_user_permission.rb +2 -0
  58. data/lib/serverspec_extra_types/types/rabbitmq_vhost_list.rb +2 -0
  59. data/lib/serverspec_extra_types/types/rabbitmq_vhost_policy.rb +2 -0
  60. data/lib/serverspec_extra_types/types.rb +4 -1
  61. data/lib/serverspec_extra_types/version.rb +3 -1
  62. data/lib/serverspec_extra_types.rb +2 -0
  63. metadata +10 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96e79429386d9d0d4ce0d3dc5373049dd01623c04a23bd0355394490269c299f
4
- data.tar.gz: 4082441c14b9ef334c934a131e45cc1978c86d1b05f18b2f1194679d27f1e9f2
3
+ metadata.gz: 2cc0937c3203bf7d4ef0ba9e666ed13f66998567e50d6449cb5d1a0a8edcabcb
4
+ data.tar.gz: 031ef294d6cde551b72de443877615f802329fbbeb1194975fd60e96c2e19df7
5
5
  SHA512:
6
- metadata.gz: 8bb1e4656cd39213f5d95026f33e0dc321f8a5e601f5c073e37fae0a144010bf5f9f2c70bdf779073d902da7ee7501708be15c30c90ae50051ac95b85c64c2ec
7
- data.tar.gz: 0ffd8996d094c3d72e031f9cfb58916e62d195f9840f5f602277824ccfdd980f63e1a0a7ae255f9a25b769d922bb42d31cfc1a64d19c8e46a12eb75b6b2f2090
6
+ metadata.gz: 3f0a596c6c36fed0beeb8ca104af3849e31f997e1470623b438ba5c52272030024e2075bc06e14d61cb038b8d5059631b173b0effdda9f8210e6f208546f6f17
7
+ data.tar.gz: d68b548f93c620772276064208e212e014e5bdc3823be40ebeca5a8266544229bcb4d55bae140fb1500cc7c5f0c3d4fd5f72e12b678100129035c2676c4f9c4e
data/.rubocop.yml CHANGED
@@ -1,8 +1,10 @@
1
1
  AllCops:
2
+ TargetRubyVersion: 2.4
2
3
  Exclude:
3
4
  - 'serverspec-extra-types.gemspec'
5
+ - 'util/mkcode.rb'
4
6
 
5
- tyle/Documentation:
7
+ Style/Documentation:
6
8
  Enabled: false
7
9
 
8
10
  Metrics/LineLength:
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
data/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bundler/gem_tasks'
2
4
  require 'rspec/core/rake_task'
3
5
  require 'serverspec_launcher/rake_tasks'
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'serverspec_extra_types/extra/serverspec_extra_types'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'specinfra'
2
4
 
3
5
  rabbitmq_user = ENV['RABBITMQ_USER'] || 'guest'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :be_a_manager_node do
2
4
  match do |actual|
3
5
  actual.role == 'manager'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :be_a_worker_node do
2
4
  match do |actual|
3
5
  actual.role == 'worker'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :be_active do
2
4
  match(&:active?)
3
5
  failure_message do |actual|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :configure_queue do |vhost, queue|
2
4
  match do |actual|
3
5
  actual.configure_queue? vhost, queue
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_count do |count|
2
4
  match do |actual|
3
5
  actual.length == count
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_domainname do |domain|
2
4
  match do |actual|
3
5
  actual.has_domainname? domain
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_engine_version do |version|
2
4
  match do |actual|
3
5
  actual.has_engine_version? version
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: false
2
+
1
3
  RSpec::Matchers.define :have_environment_variable do |regex|
2
4
  chain :with_value do |value|
3
5
  @value = value
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_ha_mode do |mode|
2
4
  match do |actual|
3
5
  actual.has_ha_mode? mode
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_ha_nodes do |count|
2
4
  match do |actual|
3
5
  actual.has_ha_nodes? count
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_ha_sync_mode do |mode|
2
4
  match do |actual|
3
5
  actual.has_ha_sync_mode? mode
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_host do |host|
2
4
  match do |actual|
3
5
  actual.has_host? host
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_hostname do |hostname|
2
4
  match do |actual|
3
5
  actual.has_hostname? hostname
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_image do |image|
2
4
  match do |actual|
3
5
  actual.has_image?(image)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_image_sha do |sha|
2
4
  match do |actual|
3
5
  actual['Image'] == sha
@@ -1,6 +1,8 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_label do |label|
2
- chain :with_value do |_value|
3
- @value = _value
4
+ chain :with_value do |value|
5
+ @value = value
4
6
  end
5
7
 
6
8
  match do |actual|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_mount do |source, target|
2
4
  chain :type, :type
3
5
  match do |actual|
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_network do |name|
2
4
  match do |actual|
3
5
  actual.has_network? name
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_placement_constraint do |constraint|
2
4
  match do |actual|
3
5
  actual.has_placement_constraint? constraint
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_replica_count do |count|
2
4
  match do |actual|
3
5
  actual.replicas == count
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_restart_limit do |count|
2
4
  match do |actual|
3
5
  actual.has_restart_limit? count
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_restart_policy do |policy|
2
4
  match do |actual|
3
5
  actual.has_restart_policy?(policy)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_user do |user|
2
4
  match do |actual|
3
5
  actual.has_user? user
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  RSpec::Matchers.define :have_vhost do |vhost|
2
4
  match do |actual|
3
5
  actual.has_vhost? vhost
@@ -0,0 +1,109 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec::Matchers.define :respond_with_100 do
4
+ match do |actual|
5
+ actual.response_code == 100
6
+ end
7
+ failure_message do |actual|
8
+ "expected #{actual} to respond with 100 was #{actual.response_code}"
9
+ end
10
+ end
11
+
12
+ RSpec::Matchers.define :respond_with_CONTINUE do
13
+ match do |actual|
14
+ actual.response_code == 100
15
+ end
16
+ failure_message do |actual|
17
+ "expected #{actual} to respond with 100 was #{actual.response_code}"
18
+ end
19
+ end
20
+
21
+ RSpec::Matchers.define :respond_with_continue do
22
+ match do |actual|
23
+ actual.response_code == 100
24
+ end
25
+ failure_message do |actual|
26
+ "expected #{actual} to respond with 100 was #{actual.response_code}"
27
+ end
28
+ end
29
+
30
+ RSpec::Matchers.define :be_continue do
31
+ match do |actual|
32
+ actual.response_code == 100
33
+ end
34
+ failure_message do |actual|
35
+ "expected #{actual} to respond with 100 was #{actual.response_code}"
36
+ end
37
+ end
38
+
39
+ RSpec::Matchers.define :respond_with_101 do
40
+ match do |actual|
41
+ actual.response_code == 101
42
+ end
43
+ failure_message do |actual|
44
+ "expected #{actual} to respond with 101 was #{actual.response_code}"
45
+ end
46
+ end
47
+
48
+ RSpec::Matchers.define :respond_with_SWITCHING_PROTOCOLS do
49
+ match do |actual|
50
+ actual.response_code == 101
51
+ end
52
+ failure_message do |actual|
53
+ "expected #{actual} to respond with 101 was #{actual.response_code}"
54
+ end
55
+ end
56
+
57
+ RSpec::Matchers.define :respond_with_switching_protocols do
58
+ match do |actual|
59
+ actual.response_code == 101
60
+ end
61
+ failure_message do |actual|
62
+ "expected #{actual} to respond with 101 was #{actual.response_code}"
63
+ end
64
+ end
65
+
66
+ RSpec::Matchers.define :be_switching_protocols do
67
+ match do |actual|
68
+ actual.response_code == 101
69
+ end
70
+ failure_message do |actual|
71
+ "expected #{actual} to respond with 101 was #{actual.response_code}"
72
+ end
73
+ end
74
+
75
+ RSpec::Matchers.define :respond_with_102 do
76
+ match do |actual|
77
+ actual.response_code == 102
78
+ end
79
+ failure_message do |actual|
80
+ "expected #{actual} to respond with 102 was #{actual.response_code}"
81
+ end
82
+ end
83
+
84
+ RSpec::Matchers.define :respond_with_PROCESSING do
85
+ match do |actual|
86
+ actual.response_code == 102
87
+ end
88
+ failure_message do |actual|
89
+ "expected #{actual} to respond with 102 was #{actual.response_code}"
90
+ end
91
+ end
92
+
93
+ RSpec::Matchers.define :respond_with_processing do
94
+ match do |actual|
95
+ actual.response_code == 102
96
+ end
97
+ failure_message do |actual|
98
+ "expected #{actual} to respond with 102 was #{actual.response_code}"
99
+ end
100
+ end
101
+
102
+ RSpec::Matchers.define :be_processing do
103
+ match do |actual|
104
+ actual.response_code == 102
105
+ end
106
+ failure_message do |actual|
107
+ "expected #{actual} to respond with 102 was #{actual.response_code}"
108
+ end
109
+ end
@@ -0,0 +1,361 @@
1
+ # frozen_string_literal: true
2
+
3
+ RSpec::Matchers.define :respond_with_200 do
4
+ match do |actual|
5
+ actual.response_code == 200
6
+ end
7
+ failure_message do |actual|
8
+ "expected #{actual} to respond with 200 was #{actual.response_code}"
9
+ end
10
+ end
11
+
12
+ RSpec::Matchers.define :respond_with_OK do
13
+ match do |actual|
14
+ actual.response_code == 200
15
+ end
16
+ failure_message do |actual|
17
+ "expected #{actual} to respond with 200 was #{actual.response_code}"
18
+ end
19
+ end
20
+
21
+ RSpec::Matchers.define :respond_with_ok do
22
+ match do |actual|
23
+ actual.response_code == 200
24
+ end
25
+ failure_message do |actual|
26
+ "expected #{actual} to respond with 200 was #{actual.response_code}"
27
+ end
28
+ end
29
+
30
+ RSpec::Matchers.define :be_ok do
31
+ match do |actual|
32
+ actual.response_code == 200
33
+ end
34
+ failure_message do |actual|
35
+ "expected #{actual} to respond with 200 was #{actual.response_code}"
36
+ end
37
+ end
38
+
39
+ RSpec::Matchers.define :respond_with_201 do
40
+ match do |actual|
41
+ actual.response_code == 201
42
+ end
43
+ failure_message do |actual|
44
+ "expected #{actual} to respond with 201 was #{actual.response_code}"
45
+ end
46
+ end
47
+
48
+ RSpec::Matchers.define :respond_with_CREATED do
49
+ match do |actual|
50
+ actual.response_code == 201
51
+ end
52
+ failure_message do |actual|
53
+ "expected #{actual} to respond with 201 was #{actual.response_code}"
54
+ end
55
+ end
56
+
57
+ RSpec::Matchers.define :respond_with_created do
58
+ match do |actual|
59
+ actual.response_code == 201
60
+ end
61
+ failure_message do |actual|
62
+ "expected #{actual} to respond with 201 was #{actual.response_code}"
63
+ end
64
+ end
65
+
66
+ RSpec::Matchers.define :be_created do
67
+ match do |actual|
68
+ actual.response_code == 201
69
+ end
70
+ failure_message do |actual|
71
+ "expected #{actual} to respond with 201 was #{actual.response_code}"
72
+ end
73
+ end
74
+
75
+ RSpec::Matchers.define :respond_with_202 do
76
+ match do |actual|
77
+ actual.response_code == 202
78
+ end
79
+ failure_message do |actual|
80
+ "expected #{actual} to respond with 202 was #{actual.response_code}"
81
+ end
82
+ end
83
+
84
+ RSpec::Matchers.define :respond_with_ACCEPTED do
85
+ match do |actual|
86
+ actual.response_code == 202
87
+ end
88
+ failure_message do |actual|
89
+ "expected #{actual} to respond with 202 was #{actual.response_code}"
90
+ end
91
+ end
92
+
93
+ RSpec::Matchers.define :respond_with_accepted do
94
+ match do |actual|
95
+ actual.response_code == 202
96
+ end
97
+ failure_message do |actual|
98
+ "expected #{actual} to respond with 202 was #{actual.response_code}"
99
+ end
100
+ end
101
+
102
+ RSpec::Matchers.define :be_accepted do
103
+ match do |actual|
104
+ actual.response_code == 202
105
+ end
106
+ failure_message do |actual|
107
+ "expected #{actual} to respond with 202 was #{actual.response_code}"
108
+ end
109
+ end
110
+
111
+ RSpec::Matchers.define :respond_with_203 do
112
+ match do |actual|
113
+ actual.response_code == 203
114
+ end
115
+ failure_message do |actual|
116
+ "expected #{actual} to respond with 203 was #{actual.response_code}"
117
+ end
118
+ end
119
+
120
+ RSpec::Matchers.define :respond_with_NON_AUTHORITATIVE_INFORMATION do
121
+ match do |actual|
122
+ actual.response_code == 203
123
+ end
124
+ failure_message do |actual|
125
+ "expected #{actual} to respond with 203 was #{actual.response_code}"
126
+ end
127
+ end
128
+
129
+ RSpec::Matchers.define :respond_with_non_authoritative_information do
130
+ match do |actual|
131
+ actual.response_code == 203
132
+ end
133
+ failure_message do |actual|
134
+ "expected #{actual} to respond with 203 was #{actual.response_code}"
135
+ end
136
+ end
137
+
138
+ RSpec::Matchers.define :be_non_authoritative_information do
139
+ match do |actual|
140
+ actual.response_code == 203
141
+ end
142
+ failure_message do |actual|
143
+ "expected #{actual} to respond with 203 was #{actual.response_code}"
144
+ end
145
+ end
146
+
147
+ RSpec::Matchers.define :respond_with_204 do
148
+ match do |actual|
149
+ actual.response_code == 204
150
+ end
151
+ failure_message do |actual|
152
+ "expected #{actual} to respond with 204 was #{actual.response_code}"
153
+ end
154
+ end
155
+
156
+ RSpec::Matchers.define :respond_with_NO_CONTENT do
157
+ match do |actual|
158
+ actual.response_code == 204
159
+ end
160
+ failure_message do |actual|
161
+ "expected #{actual} to respond with 204 was #{actual.response_code}"
162
+ end
163
+ end
164
+
165
+ RSpec::Matchers.define :respond_with_no_content do
166
+ match do |actual|
167
+ actual.response_code == 204
168
+ end
169
+ failure_message do |actual|
170
+ "expected #{actual} to respond with 204 was #{actual.response_code}"
171
+ end
172
+ end
173
+
174
+ RSpec::Matchers.define :be_no_content do
175
+ match do |actual|
176
+ actual.response_code == 204
177
+ end
178
+ failure_message do |actual|
179
+ "expected #{actual} to respond with 204 was #{actual.response_code}"
180
+ end
181
+ end
182
+
183
+ RSpec::Matchers.define :respond_with_205 do
184
+ match do |actual|
185
+ actual.response_code == 205
186
+ end
187
+ failure_message do |actual|
188
+ "expected #{actual} to respond with 205 was #{actual.response_code}"
189
+ end
190
+ end
191
+
192
+ RSpec::Matchers.define :respond_with_RESET_CONTENT do
193
+ match do |actual|
194
+ actual.response_code == 205
195
+ end
196
+ failure_message do |actual|
197
+ "expected #{actual} to respond with 205 was #{actual.response_code}"
198
+ end
199
+ end
200
+
201
+ RSpec::Matchers.define :respond_with_reset_content do
202
+ match do |actual|
203
+ actual.response_code == 205
204
+ end
205
+ failure_message do |actual|
206
+ "expected #{actual} to respond with 205 was #{actual.response_code}"
207
+ end
208
+ end
209
+
210
+ RSpec::Matchers.define :be_reset_content do
211
+ match do |actual|
212
+ actual.response_code == 205
213
+ end
214
+ failure_message do |actual|
215
+ "expected #{actual} to respond with 205 was #{actual.response_code}"
216
+ end
217
+ end
218
+
219
+ RSpec::Matchers.define :respond_with_206 do
220
+ match do |actual|
221
+ actual.response_code == 206
222
+ end
223
+ failure_message do |actual|
224
+ "expected #{actual} to respond with 206 was #{actual.response_code}"
225
+ end
226
+ end
227
+
228
+ RSpec::Matchers.define :respond_with_PARTIAL_CONTENT do
229
+ match do |actual|
230
+ actual.response_code == 206
231
+ end
232
+ failure_message do |actual|
233
+ "expected #{actual} to respond with 206 was #{actual.response_code}"
234
+ end
235
+ end
236
+
237
+ RSpec::Matchers.define :respond_with_partial_content do
238
+ match do |actual|
239
+ actual.response_code == 206
240
+ end
241
+ failure_message do |actual|
242
+ "expected #{actual} to respond with 206 was #{actual.response_code}"
243
+ end
244
+ end
245
+
246
+ RSpec::Matchers.define :be_partial_content do
247
+ match do |actual|
248
+ actual.response_code == 206
249
+ end
250
+ failure_message do |actual|
251
+ "expected #{actual} to respond with 206 was #{actual.response_code}"
252
+ end
253
+ end
254
+
255
+ RSpec::Matchers.define :respond_with_207 do
256
+ match do |actual|
257
+ actual.response_code == 207
258
+ end
259
+ failure_message do |actual|
260
+ "expected #{actual} to respond with 207 was #{actual.response_code}"
261
+ end
262
+ end
263
+
264
+ RSpec::Matchers.define :respond_with_MULTI_STATUS do
265
+ match do |actual|
266
+ actual.response_code == 207
267
+ end
268
+ failure_message do |actual|
269
+ "expected #{actual} to respond with 207 was #{actual.response_code}"
270
+ end
271
+ end
272
+
273
+ RSpec::Matchers.define :respond_with_multi_status do
274
+ match do |actual|
275
+ actual.response_code == 207
276
+ end
277
+ failure_message do |actual|
278
+ "expected #{actual} to respond with 207 was #{actual.response_code}"
279
+ end
280
+ end
281
+
282
+ RSpec::Matchers.define :be_multi_status do
283
+ match do |actual|
284
+ actual.response_code == 207
285
+ end
286
+ failure_message do |actual|
287
+ "expected #{actual} to respond with 207 was #{actual.response_code}"
288
+ end
289
+ end
290
+
291
+ RSpec::Matchers.define :respond_with_208 do
292
+ match do |actual|
293
+ actual.response_code == 208
294
+ end
295
+ failure_message do |actual|
296
+ "expected #{actual} to respond with 208 was #{actual.response_code}"
297
+ end
298
+ end
299
+
300
+ RSpec::Matchers.define :respond_with_ALREADY_REPORTED do
301
+ match do |actual|
302
+ actual.response_code == 208
303
+ end
304
+ failure_message do |actual|
305
+ "expected #{actual} to respond with 208 was #{actual.response_code}"
306
+ end
307
+ end
308
+
309
+ RSpec::Matchers.define :respond_with_already_reported do
310
+ match do |actual|
311
+ actual.response_code == 208
312
+ end
313
+ failure_message do |actual|
314
+ "expected #{actual} to respond with 208 was #{actual.response_code}"
315
+ end
316
+ end
317
+
318
+ RSpec::Matchers.define :be_already_reported do
319
+ match do |actual|
320
+ actual.response_code == 208
321
+ end
322
+ failure_message do |actual|
323
+ "expected #{actual} to respond with 208 was #{actual.response_code}"
324
+ end
325
+ end
326
+
327
+ RSpec::Matchers.define :respond_with_226 do
328
+ match do |actual|
329
+ actual.response_code == 226
330
+ end
331
+ failure_message do |actual|
332
+ "expected #{actual} to respond with 226 was #{actual.response_code}"
333
+ end
334
+ end
335
+
336
+ RSpec::Matchers.define :respond_with_IM_USED do
337
+ match do |actual|
338
+ actual.response_code == 226
339
+ end
340
+ failure_message do |actual|
341
+ "expected #{actual} to respond with 226 was #{actual.response_code}"
342
+ end
343
+ end
344
+
345
+ RSpec::Matchers.define :respond_with_im_used do
346
+ match do |actual|
347
+ actual.response_code == 226
348
+ end
349
+ failure_message do |actual|
350
+ "expected #{actual} to respond with 226 was #{actual.response_code}"
351
+ end
352
+ end
353
+
354
+ RSpec::Matchers.define :be_im_used do
355
+ match do |actual|
356
+ actual.response_code == 226
357
+ end
358
+ failure_message do |actual|
359
+ "expected #{actual} to respond with 226 was #{actual.response_code}"
360
+ end
361
+ end