Capybara and RSpec testing

Posted . Visible to the public.

visit '/static_pages/home'
expect(page).to have_content('Sample App')

Visit simulates visiting the website (provided by capybara), and capybara also gives us a page variable.

Robb Schuneman
Posted by Robb Schuneman to Ruby on Rails (2014-04-09 07:16)