File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
spec/unit/provider/package Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 1717 before :each do
1818 # Stub some provider methods to avoid needing the actual software
1919 # installed, so we can test on whatever platform we want.
20- allow ( Puppet ::Util ) . to receive ( :which ) . with ( "pkg_info" ) . and_return ( "/usr/sbin/pkg_info" )
20+ # allow(Puppet::Util).to receive(:which).with("pkg_info").and_return("/usr/sbin/pkg_info")
2121 allow ( described_class ) . to receive ( :which ) . with ( "pkg_info" ) . and_return ( "/usr/sbin/pkg_info" )
2222 allow ( described_class ) . to receive ( :command ) . with ( :pkginfo ) . and_return ( '/usr/sbin/pkg_info' )
2323 allow ( described_class ) . to receive ( :command ) . with ( :pkgadd ) . and_return ( '/usr/sbin/pkg_add' )
2626
2727 context "#instances" do
2828 it "should return nil if execution failed" do
29- allow ( described_class ) . to receive ( :command ) . with ( :pkginfo ) . and_return ( '/usr/sbin/pkg_info' )
29+ allow ( provider ) . to receive ( :command ) . with ( :pkginfo ) . and_return ( '/usr/sbin/pkg_info' )
3030 expect ( provider ) . to receive ( :pkginfo ) . and_raise ( Puppet ::ExecutionFailure , 'wawawa' )
3131 #expect(provider).to receive(:pkginfo).with(['-a', '-z'])
3232 expect ( described_class . instances ) . to be_nil
You can’t perform that action at this time.
0 commit comments