使用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