How can I test the page title with Capybara 2.0?

I had the same issues when I upgraded to Capybara 2.0, and managed to solve them by creating the following custom RSpec matcher using Capybara.string: spec/support/utilities.rb RSpec::Matchers::define :have_title do |text| match do |page| Capybara.string(page.body).has_selector?(‘title’, text: text) end end Now, in a spec file where subject { page }, I can use: it { should have_title(“My … Read more