Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Issue with partial match #198

Closed
epinault opened this Issue Aug 1, 2012 · 2 comments

Comments

Projects
None yet
2 participants

epinault commented Aug 1, 2012

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:inadd_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:inwith'
# /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:inblock (2 levels) in <top (required)>'
# /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:inblock 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:inrun'
# /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:inmap'
# /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:inrun'
# /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:inmap'
# /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:inreport'
# /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:inrun'
# /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'

Owner

bblimke commented Aug 1, 2012

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

@bblimke bblimke closed this Aug 1, 2012

epinault commented Aug 1, 2012

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