rails spec / spec_helper中require'capybara / rails'和'capybara / rspec'之间有什么区别?

时间:2012-11-20 17:49:34

标签: ruby-on-rails rspec capybara

使用capybara2.0,有什么区别,哪个在我的新应用中更好?

我的理解,require 'capybara/rails'更好,并在下面使用:

spec/{controllers,models,...} #=> rspec
spec/requests #=> rspec
spec/features #=> capybara

capybara/rspec是capybara1,旧的spec/requests #=> rspec, capybara,这不简单。

https://github.com/jnicklas/capybara/blob/master/lib/capybara/rails.rb https://github.com/jnicklas/capybara/blob/master/lib/capybara/rspec.rb

0 个答案:

没有答案