lib/setsuzoku/rspec/dynamic_spec_helper.rb in setsuzoku-0.10.11 vs lib/setsuzoku/rspec/dynamic_spec_helper.rb in setsuzoku-0.10.12

- old
+ new

@@ -263,12 +263,15 @@ if url.match?(/.*\{\{.*\}\}/) url, body = plugin.api_strategy.replace_dynamic_vars(full_url: url, req_params: req_params) end - case propz[:request_format] - when :file + if propz[:request_format] == :file body = body.to_json if body.is_a?(Hash) + elsif format == :json + #faraday sorts hash keys for some reason + body = body.to_json if body.is_a?(Hash) + body = JSON.parse(body).sort.to_h end [url, body] rescue [url, nil] end \ No newline at end of file