[rspec-users] Test JSON with Cucumber
bkocik at gmail.com
Mon May 11 19:40:09 EDT 2009
ooh - I love this solution. The downsides that immediately come to
mind are that I'd be putting XPath expressions in my acceptance tests
which aren't necessarily readable, but since I'm the only one who has
to read them that's alright, and that I have to parse JSON into a
hash, convert the hash to XML, and then parse that XML again with
Nokogiri or something, but assuming that the converters I'm using are
well-tested and predictable, that's an acceptable thing to me.
The upside is that I can query my JSON with arbitrary depth and
precision using XPath. Awesome.
I love having access to groups of people who are smarter than me.
Thanks for everyone's suggestions...
On Mon, May 11, 2009 at 6:42 PM, Zach Dennis <zach.dennis at gmail.com> wrote:
> Another options is to call #to_xml on the JSON hash returned by
> #decode, and then use XPath since you seem to already know it,
More information about the rspec-users