开发者

Using rspec with Webrat instead of Capybara

I 开发者_如何学Pythonhave been using rspec with webrat and decided to add cucumber for high level tests.

After installing cucumber with capybara, for some reason rspec also switched to using it.

Is there a way to tell rspec to continue using webrat ?


Make sure you have both webrat and capybara in your Gemfile, and add the following to your /spec/spec_helper.rb:

require "webrat"
Webrat.configure do |config|
    config.mode = :rails
end

I've just switched to capybara, but my view specs stopped working because capybara has no 'have_selector'. Guess you had a similar problem, well, now it's (hopefully) solved.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜