describe file('/etc/checkfiles/server.cfg') do
its(:content) {
should contain("\/usr\/lib64\/nagios\/plugins\/check_procs -w 150 -c 200")
.after(/command\[check_total_procs\]\=/)
}
end
我正在使用包含此代码的匹配器,但它将被淘汰。“server.cfg”中有这么多行,我只想检查 1 行。如何在不包含匹配器的情况下制作相同的工作代码?