RSpec controller testing - blank response.body

后端 未结 4 1453
长发绾君心
长发绾君心 2021-01-30 03:08

I am stuck with a problem when testing my controllers with RSpec - the response.body call always returns an empty string. In browser everything renders correctly, and cucumber f

4条回答
  •  耶瑟儿~
    2021-01-30 03:25

    RSpec 2+: If you want to check end to end - url to response body - use a request spec instead of a controller spec.

提交回复
热议问题