spec/unit/rpc/actionrunner_spec.rb in mcollective-client-2.2.4 vs spec/unit/rpc/actionrunner_spec.rb in mcollective-client-2.4.0

- old
+ new

@@ -149,10 +149,11 @@ describe "#canrun?" do it "should correctly report executables" do if Util.windows? @runner.canrun?(File.join(ENV['SystemRoot'], "explorer.exe")).should == true else - @runner.canrun?("/bin/true").should == true + true_exe = ENV["PATH"].split(File::PATH_SEPARATOR).map {|f| p = File.join(f, "true") ;p if File.exists?(p)}.compact.first + @runner.canrun?(true_exe).should == true end end it "should detect missing files" do @runner.canrun?("/nonexisting").should == false