Capybara in View spec? #39

giangnguyennet opened this Issue Jun 10, 2012 · 2 comments


None yet

3 participants


As far as I know Capybara is for integration specs which stored in ./spec/requests/ directory so a bit confused when seeing this in View spec section:

Prefer the capybara negative selectors over should_not with the positive.

# bad
page.should_not have_selector('input', type: 'submit')
page.should_not have_xpath('tr')

# good
page.should have_no_selector('input', type: 'submit')
page.should have_no_xpath('tr')

Or am I missing something?


Capybara doesn't only used for integration specs. You can use gem for view specs too.

bbatsov commented May 21, 2014

This section was removed from the guide.

@bbatsov bbatsov closed this May 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment