You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WhenIget"/files.json"# my last_json returns something like:# "{\"files\":[{\"uuid\":\"7cd19c4d-83c2-4acb-9ed8-44800eee6442\"},{\"uuid\":\"05a8bee9-c7b0-43d8-9aa2-743f5786deb8\"]}"AndIkeeptheJSONresponseat"files/0/uuid"as"FILE_UUID"# this is was memorized as: {:IMAGE_UUID=>"\"7cd19c4d-83c2-4acb-9ed8-44800eee6442\""}# would expect just "7cd19c4d-83c2-4acb-9ed8-44800eee6442", which is without the escaped stringsWhenIget"/files/%{FILE_UUID}.json"# because the above actual memorisation results in a get to url "/files/\"7cd19c4d-83c2-4acb-9ed8-44800eee6442\".json", which is not right
The text was updated successfully, but these errors were encountered:
The typical usage for this is to assert equality of subsections of JSON, not to pull out Ruby values. While I see that this would be useful, I wouldn't want to change the normal memory so drastically. You could change your step to something like:
step/I get "([^"]*)"/do |path|
actually_perform_getparse_json(JsonSpec.remember(path))end
…assuming you have the JsonSpec::Helpers included.
I hope that helps. Please feel free to submit a pull request to add something like JsonSpec::Memory#remember_and_parse.
The text was updated successfully, but these errors were encountered: