我有一些测试在我可以手动验证应该通过的非常简单的请求上失败。
it { should have_selector('title', text: app_title('Sign in')) }
输出:
expected css "title" with text "CredSimple - Sign in" to return something
除了无法通过测试的消息之外,我想 rspec 告诉我它遇到了什么。是否有一个指令可以用来告诉引擎输出它看到的页面?就像是:
expected css "title" with text "CredSimple - Sign in" to return something **instead returned text "Wrong Page Title"**