webmock
webmock copied to clipboard
Failing spec to expose problem mentioned in #384
I suspect this spec doesn't belong here. And, I haven't looked into the implementation yet. Helpful suggestions are welcome.
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.
I rewrote the spec and moved it to a better home.
Thank you @mikegee This should help when developing the fix.