Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Issue with partial match #198

Closed
epinault opened this Issue · 2 comments

2 participants

@epinault

the following

stub_request(:get, "www.example.com").with(:query => hash_including({:page => '2'}))

fails with

TypeError:
can't convert RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher into String
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/webmock-1.7.10/lib/webmock/request_pattern.rb:111:in +'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/webmock-1.7.10/lib/webmock/request_pattern.rb:111:in
add_query_params'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/webmock-1.7.10/lib/webmock/request_pattern.rb:46:in assign_options'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/webmock-1.7.10/lib/webmock/request_pattern.rb:17:in
with'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/webmock-1.7.10/lib/webmock/request_stub.rb:13:in with'
# /home/emmanuel/talemetry/talemetry_match_gems/ts_talentlist_client/spec/ts_talentlist_client_spec.rb:127:in
block (2 levels) in '
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:113:in instance_eval'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:113:in
block in run'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:253:in with_around_each_hooks'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/example.rb:110:in
run'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:378:in block in run_examples'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:374:in
map'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:374:in run_examples'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/example_group.rb:360:in
run'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in block (2 levels) in run'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in
map'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:28:in block in run'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/reporter.rb:34:in
report'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/command_line.rb:25:in run'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:69:in
run'
# /home/emmanuel/talemetry/talemetry_match_gems/vendor/ruby/1.9.1/gems/rspec-core-2.11.1/lib/rspec/core/runner.rb:8:in `block in autorun'

@bblimke
Owner

You are using WebMock 1.7.10. hash_including support was introduced since version 1.8.0

@bblimke bblimke closed this
@epinault

unfortunately I cannot upgrade due to conflict dependencies :( But I am using a pure regex match for now until then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.