RSpec2 and Capybara

后端 未结 2 1329
长发绾君心
长发绾君心 2020-12-09 12:21

Capybara is confusing me. If I use Capybara in combination with Ruby on Rails 3 and RSpec 2, then in RSpec request tests, the following matcher works:

respon         


        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-09 12:43

    You would use response when you want to use the standard rails methods. And, alternately, you'd use page when you want to use the capybara methods. In capybara you'd most likely use have_css in the example given.

提交回复
热议问题