bblimke / webmock

Library for stubbing and setting expectations on HTTP requests in Ruby.
MIT License
3.97k stars 555 forks source link

ArgumentError when using vcr/webmock/openstack #644

Open z5h opened 8 years ago

z5h commented 8 years ago

Here is the the stacktrace. The issue looks like a callback webmock to swift. This is code that works fine outside of tests when not mocking.

Minitest::UnexpectedError: ArgumentError: wrong number of arguments (0 for 1..2)
    openstack (2.0.2) lib/openstack/swift/connection.rb:172:in `read'
    webmock (2.1.0) lib/webmock/http_lib_adapters/net_http.rb:285:in `request_signature_from_request'
    webmock (2.1.0) lib/webmock/http_lib_adapters/net_http.rb:75:in `request'
    openstack (2.0.2) lib/openstack/connection.rb:143:in `put_object'
    openstack (2.0.2) lib/openstack/swift/storage_object.rb:252:in `write'
    test/models/lib/swift_test.rb:53:in `delete_user_success'
    test/models/lib/swift_test.rb:39:in `block in test_record_successes'
    test/models/lib/swift_test.rb:19:in `call'
    test/models/lib/swift_test.rb:19:in `block in with_success_cassette'
    vcr (3.0.3) lib/vcr/util/variable_args_block_caller.rb:9:in `call'
    vcr (3.0.3) lib/vcr/util/variable_args_block_caller.rb:9:in `call_block'
    vcr (3.0.3) lib/vcr.rb:189:in `use_cassette'
z5h commented 8 years ago

Note that this may be actually be an issue with https://github.com/ruby-openstack/ruby-openstack/issues/84.