collectiveidea/json_spec — pull request #30 by rudionrails (2012-06-05 09:47:52+00:00)
Title: Helpers#parse_json to not parse unless a String

Hi,

I currently have a setup that had a `last_json` method already implemented before migrating to json_spec for cucumber testing. The method already returned a parsed JSON, which is not compatible since json_spec wants to parse it again from a string.

I committed a change to only parse the JSON in case it's a string (else return the given option). I can't see a reason why `last_json` should only be the `last_response.body` string (or similar) and not already a Hash/Array.

Would that be something you could merge into the main branch?

Best,
Rudi