使用 or 语句的 Chef serverspec `describe command`

Chef serverspec `describe command` using an or statement

我想使用 serverspec 检查并 运行 它针对两个可接受的结果,因此如果其中一个通过,则检查通过。如果命令的退出状态是 0 或 1,我希望我的检查通过。这是我的检查:

describe command("rm /var/tmp/*.test") do
  its(:exit_status) { should eq 0 }   
end

现在它只能检查退出状态是否为 0。如何更改我的检查以使用 0 或 1 作为可接受的退出状态?

使用复合匹配器。

its(:exit_status) { should eq(0).or eq(1) }