I just updated a rails app to rails 3.2.11 which broke my (very basic) acceptance tests. A test which used to verify the contents of the title
tag using
page.html.must_have_content(title_text)
It turned out that the page still has the title, but the page
object does not provide it anymore. The following passes now:
visit Refinery::railtie_routes_url_helpers.root_path
title_text = "Tischtennisverband des Kantons Zürich"
page.html.must_have_content(title_text)
page.wont_have_content(title_text)
within "title" do
page.wont_have_content(title_text)
end
so the html
still contains my title_text
, it still has a title
tag (otherwise within
would fail), but there is no contents to that tag anymore. Am I missing on a better way to test the content of head
(as page
only seems to contain body
now) or do
minitest-4.4.0
, capybara-2.0.2
and nokogiri-1.5.6
(which got picked up during bundle update
) not play along real nicely?