Skip to content

Instantly share code, notes, and snippets.

@begriffs
Created August 28, 2012 23:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save begriffs/3505211 to your computer and use it in GitHub Desktop.
Save begriffs/3505211 to your computer and use it in GitHub Desktop.
vcr rspec
$ rake spec
Run options: include {:focus=>true}
All examples were filtered out; ignoring {:focus=>true}
1) Excon hook when Excon's streaming API is used properly records and plays back the response
Failure/Error: recorded.should eq(played_back)
expected: ""
got: "FOO!"
(compared using ==)
# ./spec/vcr/library_hooks/excon_spec.rb:81:in `block (3 levels) in <top (required)>'
2) Excon hook when Excon raises an error due to an unexpected response status raises the same error class as excon itself raises
Failure/Error: stubbed_error.class.should be(real_error.class)
expected #<Class:70209102000440> => Excon::Errors::SocketError
got #<Class:70209101963500> => Excon::Errors::NotFound
Compared using equal?, which compares object identity,
but expected and actual are not the same object. Use
'actual.should eq(expected)' if you don't care about
object identity in this example.
Diff:
@@ -1,2 +1,2 @@
-Excon::Errors::SocketError
+Excon::Errors::NotFound
# ./spec/vcr/library_hooks/excon_spec.rb:141:in `block (3 levels) in <top (required)>'
2049/2049: 100% |==========================================| ETA: 00:00:00
Non-VCR warnings written to tmp/warnings.txt
2049/2049: 100% |==========================================| Time: 00:00:26
Pending:
VCR::Middleware::Faraday behaves like a hook into an HTTP library using Faraday (net_http) plays back an empty body response exactly as it was recorded (e.g. nil vs empty string)
# awaiting an external fix
# ./spec/support/shared_example_groups/hook_into_http_library.rb:58
FakeWeb hook behaves like a hook into an HTTP library using Net::HTTP plays back an empty body response exactly as it was recorded (e.g. nil vs empty string)
# awaiting an external fix
# ./spec/support/shared_example_groups/hook_into_http_library.rb:58
Finished in 26.3 seconds
2049 examples, 2 failures, 2 pending
Failed examples:
rspec ./spec/vcr/library_hooks/excon_spec.rb:67 # Excon hook when Excon's streaming API is used properly records and plays back the response
rspec ./spec/vcr/library_hooks/excon_spec.rb:132 # Excon hook when Excon raises an error due to an unexpected response status raises the same error class as excon itself raises
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment