문제

I am using cucumber and capybara along with rails 2.3.9.

How do I verify the page title? I try to have a good page title for every GET request and would like to verify that in my cucumber tests.

도움이 되었습니까?

해결책

Got it.

Then /^I should see page title as "(.*)"$/ do |title|
  assert_equal title, page.find(:css, 'title').text
end
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top