README.md in vcr-1.0.0 vs README.md in vcr-1.0.1
- old
+ new
@@ -24,14 +24,14 @@
c.http_stubbing_library = :fakeweb # or :webmock
end
class VCRTest < Test::Unit::TestCase
def test_example_dot_com
- response = VCR.use_cassette('synopsis', :record => :new_episodes) do
- Net::HTTP.get_response(URI.parse('http://example.com/'))
+ VCR.use_cassette('synopsis', :record => :new_episodes) do
+ response = Net::HTTP.get_response(URI.parse('http://example.com/'))
+ assert_match /You have reached this web page by typing.*example\.com/, response.body
end
- assert_match /You have reached this web page by typing.*example\.com/, response.body
end
end
Run this test once, and VCR will record the http request to `fixtures/vcr_cassettes/synopsis.yml`. Run it again, and VCR
will replay the response from example.com when the http request is made. This test is now fast (no real HTTP requests are
@@ -186,11 +186,11 @@
be replayed for all future requests. Usually this is fine, but in some cases you need something more
dynamic. You can use [ERB](http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/) for this.
Enable ERB evaluation of a cassette using the `:erb` option:
- VCR.use_cassette('user-subscription', :erb => :true) do
+ VCR.use_cassette('user-subscription', :erb => true) do
# do something that makes an HTTP request
end
You can use variables in your cassette's ERB by passing a hash:
@@ -248,14 +248,20 @@
`VCR.use_cassette` with the record mode set to `:new_episodes` or `:all`. Run the test again, and VCR will
record the HTTP interaction. I usually remove the record mode at this point so that it uses the default
of `:none` in the future. Future test runs will get the recorded response, and if your code changes so
that it is making a new HTTP request, you'll be notified by an error as shown above.
-## Ruby Version Compatibility
+## Ruby Interpreter Compatibility
-VCR has been tested on ruby 1.8.6, 1.8.7 and 1.9.1.
+VCR has been tested on the following ruby interpreters:
+* MRI 1.8.6
+* MRI 1.8.7
+* MRI 1.9.1
+* MRI 1.9.2 preview 3
+* JRuby 1.5.1
+
## Notes, etc.
* The objects serialized to the cassette YAML files changed with the 0.4 release. Cassettes recorded with
older versions of VCR will not work with VCR 0.4.0 and later. However, VCR provides a rake task to migrate
your old cassettes to the new format--see the [changelog](http://github.com/myronmarston/vcr/blob/master/CHANGELOG.md)
@@ -285,8 +291,15 @@
* [Bartosz Blimke](http://github.com/bblimke) for [WebMock](http://github.com/bblimke/webmock).
* [Chris Kampmeier](http://github.com/chrisk) for [FakeWeb](http://github.com/chrisk/fakeweb).
* [Chris Young](http://github.com/chrisyoung) for [NetRecorder](http://github.com/chrisyoung/netrecorder),
the inspiration for VCR.
+Thanks also to the following people who have contributed patches or helpful suggestions:
+
+* [Aaron Brethorst](http://github.com/aaronbrethorst)
+* [Bartosz Blimke](http://github.com/bblimke)
+* [Ben Hutton](http://github.com/benhutton)
+* [Eric Allam](http://github.com/rubymaverick)
+
## Copyright
-Copyright (c) 2010 Myron Marston. See LICENSE for details.
\ No newline at end of file
+Copyright (c) 2010 Myron Marston. See LICENSE for details.