Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我发现 Fauxhai 可以模拟“节点”中的信息,但它不能模拟 Chef::ReservedNames::Win32::Version.new。
反正有嘲笑这个吗?
标准 RSpec 如此allow(Chef::ReservedNames::Win32::Version).to receive(:new).and_return(double('fake version'))或类似地适用。
allow(Chef::ReservedNames::Win32::Version).to receive(:new).and_return(double('fake version'))