How to test JSON result from Ruby on Rails functional tests?

前端 未结 9 528
暗喜
暗喜 2021-01-29 23:35

How can I assert my Ajax request and test the JSON output from Ruby on Rails functional tests?

9条回答
  •  不知归路
    2021-01-29 23:50

    If you are using RSpec, json_spec is worth a look

    https://github.com/collectiveidea/json_spec

提交回复
热议问题