Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing spec to expose problem mentioned in #384 #487

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mikegee
Copy link

@mikegee mikegee commented Jun 12, 2015

No description provided.

@mikegee
Copy link
Author

mikegee commented Jun 12, 2015

I suspect this spec doesn't belong here. And, I haven't looked into the implementation yet. Helpful suggestions are welcome.

@mikegee
Copy link
Author

mikegee commented Jun 13, 2015

lib/webmock/util/query_mapper.rb:199 is:

new_query_values.sort!

In my example, new_query_values is:

[["tags[]", {"baz"=>"quux"}], ["tags[]", {"foo"=>"bar"}]]

Sorting this is problematic because:

{'baz'=>'quux'} <=> {'foo'=>'bar'} # => nil

Array#sort! doesn't like nils.

@mikegee mikegee force-pushed the complicated-query-string-bug branch from 5b3fe81 to 40e7ec5 Compare June 13, 2015 02:36
@mikegee
Copy link
Author

mikegee commented Jun 13, 2015

I rewrote the spec and moved it to a better home.

@bblimke
Copy link
Owner

bblimke commented Jun 13, 2015

Thank you @mikegee This should help when developing the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants