vcr 2.0.0.beta1 → 2.0.0.beta2
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.
- data/.gitignore +1 -0
- data/.travis.yml +3 -0
- data/CHANGELOG.md +37 -2
- data/Gemfile +2 -2
- data/README.md +10 -1
- data/Rakefile +43 -7
- data/Upgrade.md +45 -0
- data/features/.nav +1 -0
- data/features/cassettes/automatic_re_recording.feature +19 -17
- data/features/cassettes/dynamic_erb.feature +32 -28
- data/features/cassettes/exclusive.feature +28 -24
- data/features/cassettes/format.feature +213 -31
- data/features/cassettes/update_content_length_header.feature +20 -18
- data/features/configuration/filter_sensitive_data.feature +4 -4
- data/features/configuration/hooks.feature +27 -23
- data/features/http_libraries/em_http_request.feature +79 -75
- data/features/record_modes/all.feature +14 -14
- data/features/record_modes/new_episodes.feature +15 -15
- data/features/record_modes/none.feature +15 -15
- data/features/record_modes/once.feature +15 -15
- data/features/request_matching/body.feature +25 -23
- data/features/request_matching/custom_matcher.feature +25 -23
- data/features/request_matching/headers.feature +32 -36
- data/features/request_matching/host.feature +27 -25
- data/features/request_matching/identical_request_sequence.feature +27 -25
- data/features/request_matching/method.feature +27 -25
- data/features/request_matching/path.feature +27 -25
- data/features/request_matching/playback_repeats.feature +27 -25
- data/features/request_matching/uri.feature +27 -25
- data/features/request_matching/uri_without_param.feature +28 -26
- data/features/step_definitions/cli_steps.rb +71 -17
- data/features/support/env.rb +3 -1
- data/features/support/http_lib_filters.rb +6 -3
- data/features/support/vcr_cucumber_helpers.rb +4 -2
- data/lib/vcr.rb +6 -2
- data/lib/vcr/cassette.rb +75 -51
- data/lib/vcr/cassette/migrator.rb +111 -0
- data/lib/vcr/cassette/serializers.rb +35 -0
- data/lib/vcr/cassette/serializers/json.rb +23 -0
- data/lib/vcr/cassette/serializers/psych.rb +24 -0
- data/lib/vcr/cassette/serializers/syck.rb +35 -0
- data/lib/vcr/cassette/serializers/yaml.rb +24 -0
- data/lib/vcr/configuration.rb +6 -1
- data/lib/vcr/errors.rb +1 -1
- data/lib/vcr/library_hooks/excon.rb +1 -7
- data/lib/vcr/library_hooks/typhoeus.rb +6 -22
- data/lib/vcr/library_hooks/webmock.rb +1 -1
- data/lib/vcr/middleware/faraday.rb +1 -1
- data/lib/vcr/request_matcher_registry.rb +43 -30
- data/lib/vcr/structs.rb +209 -0
- data/lib/vcr/tasks/vcr.rake +9 -0
- data/lib/vcr/version.rb +1 -1
- data/spec/fixtures/cassette_spec/1_x_cassette.yml +110 -0
- data/spec/fixtures/cassette_spec/example.yml +79 -78
- data/spec/fixtures/cassette_spec/with_localhost_requests.yml +79 -77
- data/spec/fixtures/fake_example.com_responses.yml +78 -76
- data/spec/fixtures/match_requests_on.yml +147 -145
- data/spec/monkey_patches.rb +5 -5
- data/spec/support/http_library_adapters.rb +48 -0
- data/spec/support/shared_example_groups/hook_into_http_library.rb +53 -20
- data/spec/support/sinatra_app.rb +12 -0
- data/spec/vcr/cassette/http_interaction_list_spec.rb +1 -1
- data/spec/vcr/cassette/migrator_spec.rb +183 -0
- data/spec/vcr/cassette/serializers_spec.rb +122 -0
- data/spec/vcr/cassette_spec.rb +147 -83
- data/spec/vcr/configuration_spec.rb +11 -1
- data/spec/vcr/library_hooks/typhoeus_spec.rb +3 -3
- data/spec/vcr/library_hooks/webmock_spec.rb +7 -1
- data/spec/vcr/request_ignorer_spec.rb +1 -1
- data/spec/vcr/request_matcher_registry_spec.rb +46 -4
- data/spec/vcr/structs_spec.rb +309 -0
- data/spec/vcr_spec.rb +7 -0
- data/vcr.gemspec +9 -12
- metadata +75 -61
- data/lib/vcr/structs/http_interaction.rb +0 -58
- data/lib/vcr/structs/normalizers/body.rb +0 -24
- data/lib/vcr/structs/normalizers/header.rb +0 -64
- data/lib/vcr/structs/normalizers/status_message.rb +0 -17
- data/lib/vcr/structs/normalizers/uri.rb +0 -34
- data/lib/vcr/structs/request.rb +0 -13
- data/lib/vcr/structs/response.rb +0 -13
- data/lib/vcr/structs/response_status.rb +0 -5
- data/lib/vcr/util/yaml.rb +0 -11
- data/spec/support/shared_example_groups/normalizers.rb +0 -94
- data/spec/vcr/structs/http_interaction_spec.rb +0 -89
- data/spec/vcr/structs/request_spec.rb +0 -39
- data/spec/vcr/structs/response_spec.rb +0 -44
- data/spec/vcr/structs/response_status_spec.rb +0 -9
@@ -1,6 +1,6 @@
|
|
1
1
|
Feature: Cassette format
|
2
2
|
|
3
|
-
VCR Cassettes are
|
3
|
+
VCR Cassettes are files that contain all of the information
|
4
4
|
about the requests and corresponding responses in a
|
5
5
|
human-readable/editable format. A cassette contains an array
|
6
6
|
of HTTP interactions, each of which has the following:
|
@@ -18,13 +18,43 @@ Feature: Cassette format
|
|
18
18
|
- body
|
19
19
|
- http version
|
20
20
|
|
21
|
-
|
22
|
-
|
21
|
+
By default, VCR uses YAML to serialize this data. You can configure
|
22
|
+
VCR to use a different serializer, either on a cassette-by-cassette
|
23
|
+
basis, or as a default for all cassettes if you use the `default_cassette_options`.
|
24
|
+
|
25
|
+
VCR supports the following serializers out of the box:
|
26
|
+
|
27
|
+
- `:yaml`--Uses ruby's standard library YAML. This may use psych or syck,
|
28
|
+
depending on your ruby installation.
|
29
|
+
- `:syck`--Uses syck (the ruby 1.8 YAML engine). This is useful when using
|
30
|
+
VCR on a project that must run in environments where psych is not available
|
31
|
+
(such as on ruby 1.8), to ensure that syck is always used.
|
32
|
+
- `:psych`--Uses psych (the new ruby 1.9 YAML engine). This is useful when
|
33
|
+
you want to ensure that psych is always used.
|
34
|
+
- `:json`--Uses [multi_json](https://github.com/intridea/multi_json)
|
35
|
+
to serialize the cassette data as JSON.
|
36
|
+
|
37
|
+
You can also register a custom serializer using:
|
38
|
+
|
39
|
+
VCR.configure do |config|
|
40
|
+
config.cassette_serializers[:my_custom_serializer] = my_serializer
|
41
|
+
end
|
42
|
+
|
43
|
+
Your serializer must implement the following methods:
|
44
|
+
|
45
|
+
- `file_extension`
|
46
|
+
- `serialize(hash)`
|
47
|
+
- `deserialize(string)`
|
48
|
+
|
49
|
+
Scenario Outline: Request/Response data is saved to disk as YAML by default
|
50
|
+
Given a file named "cassette_yaml.rb" with:
|
23
51
|
"""ruby
|
24
52
|
include_http_adapter_for("<http_lib>")
|
25
53
|
|
26
|
-
|
27
|
-
|
54
|
+
if ARGV.any?
|
55
|
+
start_sinatra_app(:port => 7777) do
|
56
|
+
get('/:path') { ARGV[0] + ' ' + params[:path] }
|
57
|
+
end
|
28
58
|
end
|
29
59
|
|
30
60
|
require 'vcr'
|
@@ -39,44 +69,46 @@ Feature: Cassette format
|
|
39
69
|
make_http_request(:get, "http://localhost:7777/bar")
|
40
70
|
end
|
41
71
|
"""
|
42
|
-
When I run `ruby
|
72
|
+
When I run `ruby cassette_yaml.rb 'Hello'`
|
43
73
|
Then the file "cassettes/example.yml" should contain YAML like:
|
44
74
|
"""
|
45
|
-
---
|
46
|
-
|
47
|
-
|
48
|
-
method:
|
75
|
+
---
|
76
|
+
http_interactions:
|
77
|
+
- request:
|
78
|
+
method: get
|
49
79
|
uri: http://localhost:7777/foo
|
50
|
-
body:
|
51
|
-
headers:
|
52
|
-
response:
|
53
|
-
status:
|
80
|
+
body: ''
|
81
|
+
headers: {}
|
82
|
+
response:
|
83
|
+
status:
|
54
84
|
code: 200
|
55
85
|
message: OK
|
56
|
-
headers:
|
57
|
-
|
86
|
+
headers:
|
87
|
+
Content-Type:
|
58
88
|
- text/html;charset=utf-8
|
59
|
-
|
60
|
-
-
|
89
|
+
Content-Length:
|
90
|
+
- '9'
|
61
91
|
body: Hello foo
|
62
|
-
http_version:
|
63
|
-
|
64
|
-
|
65
|
-
method:
|
92
|
+
http_version: '1.1'
|
93
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
94
|
+
- request:
|
95
|
+
method: get
|
66
96
|
uri: http://localhost:7777/bar
|
67
|
-
body:
|
68
|
-
headers:
|
69
|
-
response:
|
70
|
-
status:
|
97
|
+
body: ''
|
98
|
+
headers: {}
|
99
|
+
response:
|
100
|
+
status:
|
71
101
|
code: 200
|
72
102
|
message: OK
|
73
|
-
headers:
|
74
|
-
|
103
|
+
headers:
|
104
|
+
Content-Type:
|
75
105
|
- text/html;charset=utf-8
|
76
|
-
|
77
|
-
-
|
106
|
+
Content-Length:
|
107
|
+
- '9'
|
78
108
|
body: Hello bar
|
79
|
-
http_version:
|
109
|
+
http_version: '1.1'
|
110
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
111
|
+
recorded_with: VCR 2.0.0
|
80
112
|
"""
|
81
113
|
|
82
114
|
Examples:
|
@@ -92,3 +124,153 @@ Feature: Cassette format
|
|
92
124
|
| c.hook_into :excon | excon |
|
93
125
|
| | faraday (w/ net_http) |
|
94
126
|
|
127
|
+
Scenario: Request/Response data can be saved as JSON
|
128
|
+
Given a file named "cassette_json.rb" with:
|
129
|
+
"""ruby
|
130
|
+
include_http_adapter_for("net/http")
|
131
|
+
|
132
|
+
start_sinatra_app(:port => 7777) do
|
133
|
+
get('/:path') { ARGV[0] + ' ' + params[:path] }
|
134
|
+
end
|
135
|
+
|
136
|
+
require 'vcr'
|
137
|
+
|
138
|
+
VCR.configure do |c|
|
139
|
+
c.hook_into :webmock
|
140
|
+
c.cassette_library_dir = 'cassettes'
|
141
|
+
end
|
142
|
+
|
143
|
+
VCR.use_cassette('example', :serialize_with => :json) do
|
144
|
+
puts response_body_for(:get, "http://localhost:7777/foo")
|
145
|
+
puts response_body_for(:get, "http://localhost:7777/bar")
|
146
|
+
end
|
147
|
+
"""
|
148
|
+
When I run `ruby cassette_json.rb 'Hello'`
|
149
|
+
Then the file "cassettes/example.json" should contain JSON like:
|
150
|
+
"""json
|
151
|
+
{
|
152
|
+
"http_interactions": [
|
153
|
+
{
|
154
|
+
"response": {
|
155
|
+
"body": "Hello foo",
|
156
|
+
"http_version": null,
|
157
|
+
"status": { "code": 200, "message": "OK" },
|
158
|
+
"headers": {
|
159
|
+
"Date": [ "Thu, 27 Oct 2011 06:16:31 GMT" ],
|
160
|
+
"Content-Type": [ "text/html;charset=utf-8" ],
|
161
|
+
"Content-Length": [ "9" ],
|
162
|
+
"Server": [ "WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30)" ],
|
163
|
+
"Connection": [ "Keep-Alive" ]
|
164
|
+
}
|
165
|
+
},
|
166
|
+
"request": {
|
167
|
+
"uri": "http://localhost:7777/foo",
|
168
|
+
"body": "",
|
169
|
+
"method": "get",
|
170
|
+
"headers": { }
|
171
|
+
},
|
172
|
+
"recorded_at": "Tue, 01 Nov 2011 04:58:44 GMT"
|
173
|
+
},
|
174
|
+
{
|
175
|
+
"response": {
|
176
|
+
"body": "Hello bar",
|
177
|
+
"http_version": null,
|
178
|
+
"status": { "code": 200, "message": "OK" },
|
179
|
+
"headers": {
|
180
|
+
"Date": [ "Thu, 27 Oct 2011 06:16:31 GMT" ],
|
181
|
+
"Content-Type": [ "text/html;charset=utf-8" ],
|
182
|
+
"Content-Length": [ "9" ],
|
183
|
+
"Server": [ "WEBrick/1.3.1 (Ruby/1.8.7/2011-06-30)" ],
|
184
|
+
"Connection": [ "Keep-Alive" ]
|
185
|
+
}
|
186
|
+
},
|
187
|
+
"request": {
|
188
|
+
"uri": "http://localhost:7777/bar",
|
189
|
+
"body": "",
|
190
|
+
"method": "get",
|
191
|
+
"headers": { }
|
192
|
+
},
|
193
|
+
"recorded_at": "Tue, 01 Nov 2011 04:58:44 GMT"
|
194
|
+
}
|
195
|
+
],
|
196
|
+
"recorded_with": "VCR 2.0.0"
|
197
|
+
}
|
198
|
+
"""
|
199
|
+
When I run `ruby cassette_json.rb`
|
200
|
+
Then it should pass with:
|
201
|
+
"""
|
202
|
+
Hello foo
|
203
|
+
Hello bar
|
204
|
+
"""
|
205
|
+
|
206
|
+
Scenario: Request/Response data can be saved using a custom serializer
|
207
|
+
Given a file named "cassette_ruby.rb" with:
|
208
|
+
"""ruby
|
209
|
+
include_http_adapter_for("net/http")
|
210
|
+
|
211
|
+
start_sinatra_app(:port => 7777) do
|
212
|
+
get('/:path') { ARGV[0] + ' ' + params[:path] }
|
213
|
+
end
|
214
|
+
|
215
|
+
require 'vcr'
|
216
|
+
|
217
|
+
# purely for demonstration purposes; obviously, don't actually
|
218
|
+
# use ruby #inspect / #eval for your serialization...
|
219
|
+
ruby_serializer = Object.new
|
220
|
+
class << ruby_serializer
|
221
|
+
def file_extension; "ruby"; end
|
222
|
+
def serialize(hash); hash.inspect; end
|
223
|
+
def deserialize(string); eval(string); end
|
224
|
+
end
|
225
|
+
|
226
|
+
VCR.configure do |c|
|
227
|
+
c.hook_into :webmock
|
228
|
+
c.cassette_library_dir = 'cassettes'
|
229
|
+
c.cassette_serializers[:ruby] = ruby_serializer
|
230
|
+
end
|
231
|
+
|
232
|
+
VCR.use_cassette('example', :serialize_with => :ruby) do
|
233
|
+
puts response_body_for(:get, "http://localhost:7777/foo")
|
234
|
+
puts response_body_for(:get, "http://localhost:7777/bar")
|
235
|
+
end
|
236
|
+
"""
|
237
|
+
When I run `ruby cassette_ruby.rb 'Hello'`
|
238
|
+
Then the file "cassettes/example.ruby" should contain ruby like:
|
239
|
+
"""
|
240
|
+
{"http_interactions"=>
|
241
|
+
[{"request"=>
|
242
|
+
{"method"=>"get",
|
243
|
+
"uri"=>"http://localhost:7777/foo",
|
244
|
+
"body"=>"",
|
245
|
+
"headers"=>{"Accept"=>["*/*"], "User-Agent"=>["Ruby"]}},
|
246
|
+
"response"=>
|
247
|
+
{"status"=>{"code"=>200, "message"=>"OK "},
|
248
|
+
"headers"=>
|
249
|
+
{"Content-Type"=>["text/html;charset=utf-8"],
|
250
|
+
"Content-Length"=>["9"],
|
251
|
+
"Connection"=>["Keep-Alive"]},
|
252
|
+
"body"=>"Hello foo",
|
253
|
+
"http_version"=>nil},
|
254
|
+
"recorded_at"=>"Tue, 01 Nov 2011 04:58:44 GMT"},
|
255
|
+
{"request"=>
|
256
|
+
{"method"=>"get",
|
257
|
+
"uri"=>"http://localhost:7777/bar",
|
258
|
+
"body"=>"",
|
259
|
+
"headers"=>{"Accept"=>["*/*"], "User-Agent"=>["Ruby"]}},
|
260
|
+
"response"=>
|
261
|
+
{"status"=>{"code"=>200, "message"=>"OK "},
|
262
|
+
"headers"=>
|
263
|
+
{"Content-Type"=>["text/html;charset=utf-8"],
|
264
|
+
"Content-Length"=>["9"],
|
265
|
+
"Connection"=>["Keep-Alive"]},
|
266
|
+
"body"=>"Hello bar",
|
267
|
+
"http_version"=>nil},
|
268
|
+
"recorded_at"=>"Tue, 01 Nov 2011 04:58:44 GMT"}],
|
269
|
+
"recorded_with"=>"VCR 2.0.0"}
|
270
|
+
"""
|
271
|
+
When I run `ruby cassette_ruby.rb`
|
272
|
+
Then it should pass with:
|
273
|
+
"""
|
274
|
+
Hello foo
|
275
|
+
Hello bar
|
276
|
+
"""
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Feature: Update content_length header
|
2
2
|
|
3
3
|
When the `:update_content_length_header` option is set to a truthy value,
|
4
|
-
VCR will ensure that the `
|
4
|
+
VCR will ensure that the `Content-Length` header will have the correct
|
5
5
|
value. This is useful in several situations:
|
6
6
|
|
7
7
|
- When you manually edit the cassette file and change the resonse body
|
@@ -12,33 +12,35 @@ Feature: Update content_length header
|
|
12
12
|
- Syck, the default YAML engine for ruby 1.8 (and 1.9, unless you compile
|
13
13
|
it to use Psych), has a bug where it sometimes will remove some
|
14
14
|
whitespace strings when you serialize them. This may cause the
|
15
|
-
`
|
15
|
+
`Content-Length` header to have the wrong value.
|
16
16
|
|
17
17
|
This is especially important when you use a client that checks the
|
18
|
-
`
|
18
|
+
`Content-Length` header. Mechanize, for example, will raise an `EOFError`
|
19
19
|
when the header value does not match the actual body length.
|
20
20
|
|
21
21
|
Background:
|
22
22
|
Given a previously recorded cassette file "cassettes/example.yml" with:
|
23
23
|
"""
|
24
|
-
---
|
25
|
-
|
26
|
-
|
27
|
-
method:
|
28
|
-
uri: http://example.com
|
29
|
-
body:
|
30
|
-
headers:
|
31
|
-
response:
|
32
|
-
status:
|
24
|
+
---
|
25
|
+
http_interactions:
|
26
|
+
- request:
|
27
|
+
method: get
|
28
|
+
uri: http://example.com/
|
29
|
+
body: ''
|
30
|
+
headers: {}
|
31
|
+
response:
|
32
|
+
status:
|
33
33
|
code: 200
|
34
34
|
message: OK
|
35
|
-
headers:
|
36
|
-
|
35
|
+
headers:
|
36
|
+
Content-Type:
|
37
37
|
- text/html;charset=utf-8
|
38
|
-
|
39
|
-
-
|
38
|
+
Content-Length:
|
39
|
+
- '11'
|
40
40
|
body: Hello <modified>
|
41
|
-
http_version:
|
41
|
+
http_version: '1.1'
|
42
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
43
|
+
recorded_with: VCR 2.0.0
|
42
44
|
"""
|
43
45
|
And a file named "common_stuff.rb" with:
|
44
46
|
"""ruby
|
@@ -52,7 +54,7 @@ Feature: Update content_length header
|
|
52
54
|
def make_request_and_print_results
|
53
55
|
response = Net::HTTP.get_response('example.com', '/')
|
54
56
|
puts "Body length: #{response.body.length}"
|
55
|
-
puts "Header value: #{response['
|
57
|
+
puts "Header value: #{response['Content-Length']}"
|
56
58
|
end
|
57
59
|
"""
|
58
60
|
|
@@ -124,15 +124,15 @@ Feature: Filter sensitive data
|
|
124
124
|
c.hook_into :webmock
|
125
125
|
c.cassette_library_dir = 'cassettes'
|
126
126
|
c.filter_sensitive_data('<PASSWORD>') do |interaction|
|
127
|
-
USER_PASSWORDS[interaction.request.headers['
|
127
|
+
USER_PASSWORDS[interaction.request.headers['X-Http-Username'].first]
|
128
128
|
end
|
129
129
|
end
|
130
130
|
|
131
131
|
VCR.use_cassette('example', :match_requests_on => [:method, :uri, :headers]) do
|
132
132
|
puts "Response: " + response_body_for(
|
133
133
|
:get, 'http://localhost:7777/', nil,
|
134
|
-
'X-
|
135
|
-
'X-
|
134
|
+
'X-Http-Username' => 'john.doe',
|
135
|
+
'X-Http-Password' => USER_PASSWORDS['john.doe']
|
136
136
|
)
|
137
137
|
end
|
138
138
|
"""
|
@@ -141,7 +141,7 @@ Feature: Filter sensitive data
|
|
141
141
|
And the file "cassettes/example.yml" should contain "body: john.doe/<PASSWORD>"
|
142
142
|
And the file "cassettes/example.yml" should contain a YAML fragment like:
|
143
143
|
"""
|
144
|
-
|
144
|
+
X-Http-Password:
|
145
145
|
- <PASSWORD>
|
146
146
|
"""
|
147
147
|
|
@@ -39,23 +39,25 @@ Feature: Hooks
|
|
39
39
|
Given a previously recorded cassette file "cassettes/example.yml" with:
|
40
40
|
"""
|
41
41
|
---
|
42
|
-
|
43
|
-
|
44
|
-
method:
|
45
|
-
uri: http://example.com
|
46
|
-
body:
|
47
|
-
headers:
|
48
|
-
response:
|
49
|
-
status:
|
42
|
+
http_interactions:
|
43
|
+
- request:
|
44
|
+
method: get
|
45
|
+
uri: http://example.com/foo
|
46
|
+
body: ''
|
47
|
+
headers: {}
|
48
|
+
response:
|
49
|
+
status:
|
50
50
|
code: 200
|
51
51
|
message: OK
|
52
52
|
headers:
|
53
|
-
|
53
|
+
Content-Type:
|
54
54
|
- text/html;charset=utf-8
|
55
|
-
|
56
|
-
-
|
55
|
+
Content-Length:
|
56
|
+
- '20'
|
57
57
|
body: example.com response
|
58
|
-
http_version:
|
58
|
+
http_version: '1.1'
|
59
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
60
|
+
recorded_with: VCR 2.0.0
|
59
61
|
"""
|
60
62
|
|
61
63
|
Scenario: Replace sensitive data with before_record hook
|
@@ -135,23 +137,25 @@ Feature: Hooks
|
|
135
137
|
Given a previously recorded cassette file "cassettes/localhost.yml" with:
|
136
138
|
"""
|
137
139
|
---
|
138
|
-
|
139
|
-
|
140
|
-
method:
|
140
|
+
http_interactions:
|
141
|
+
- request:
|
142
|
+
method: get
|
141
143
|
uri: http://localhost:7777/
|
142
|
-
body:
|
143
|
-
headers:
|
144
|
-
response:
|
145
|
-
status:
|
144
|
+
body: ''
|
145
|
+
headers: {}
|
146
|
+
response:
|
147
|
+
status:
|
146
148
|
code: 200
|
147
149
|
message: OK
|
148
150
|
headers:
|
149
|
-
|
151
|
+
Content-Type:
|
150
152
|
- text/html;charset=utf-8
|
151
|
-
|
152
|
-
-
|
153
|
+
Content-Length:
|
154
|
+
- '20'
|
153
155
|
body: recorded response
|
154
|
-
http_version:
|
156
|
+
http_version: '1.1'
|
157
|
+
recorded_at: Tue, 01 Nov 2011 04:58:44 GMT
|
158
|
+
recorded_with: VCR 2.0.0
|
155
159
|
"""
|
156
160
|
And a file named "before_playback_ignore.rb" with:
|
157
161
|
"""ruby
|