0
之前,我想写一个黄瓜测试,以确保没有从指南针CSS错误。选择体:使用RSpec/XPath的/ CSS
错误信息插入到页面下面的CSS如:
body:before {
white-space: pre;
font-family: monospace;
content: "Syntax error: Undefined mixin 'horizontal-list'";
}
所以我想写的是保证身体步:之前的内容是空的,我一直在试图围绕着变化以下:
page.should_not have_css("body:before")
但是这给了错误:
xmlXPathCompOpEval: function before not found
有人知道如何掌握:之前?
我认为这与它是一个伪元素,而不是真正的HTML元素做。 – BoltClock 2012-01-12 13:58:20
是的,我得出了同样的结论 - 尽管我明白了为什么have_xpath会因为我期望的has_css工作而感到不安! – Ash 2012-01-12 14:02:51