Rails example to test JSON responses