Who can give some test example about ror+extjs

I used the ror + extjs. But now, the question about how to write the functional test puzzled me. For example,if I used the pure ror framework,I will use redirect_to to end the function,but I must use render :json => {:success => true}.to_json,:layout=>false in many cases. So how can I write the test.