测试页面内容失败但应该成功,minitest,capybara,rails

时间:2015-10-20 15:48:39

标签: ruby-on-rails capybara minitest

我正在慢慢地教自己用minitest进行测试。我无法弄清楚为什么这个测试失败,因为页面包含我正在搜索的内容:

require "test_helper"

class CustomerViewsTest < Capybara::Rails::TestCase
  def test_aboutpage_has_content
    # visit '/customer/about'
    visit customer_about_path
    assert page.has_content?("Those creatures are sly little devils")
  end
end

我收到以下错误:Minitest::Assertion: Failed assertion, no message given.

页面存在,路径正确,我检查了拼写,页面包含该内容。我错过了什么?

0 个答案:

没有答案