making two requests to the same controller in rails integrations specs

后端 未结 5 2122
鱼传尺愫
鱼传尺愫 2021-02-12 19:17

I\'m having problem making two requests to the same url in a rails integration test, with rspec

it \'does something\' do

  # get \'/something\', {:status=>\'         


        
5条回答
  •  没有蜡笔的小新
    2021-02-12 19:32

    Using Capybara instead of rspec is a better solution for (request) intergration tests. It uses the same syntax as rspec and allow multiple requests in a single it block. I use rspec for unit testing and capybara for integration testing.

    https://github.com/jnicklas/capybara

提交回复
热议问题