I have a Rails app which implements a web service. I’m not sure how to best write tests for it.
It has one controller. Each method provides json output. As far as I can tell, functional (views) tests would be the right thing to use, but they seem to only work with HTML.
i think that you could be good with using a library like json_spec.
in combination with cucumber this could also server as a documentation for your api-users. have a look at this nice blog post using json_spec.