Commit c823e49f authored by John Skopis's avatar John Skopis Committed by Bryan McLellan
Browse files

Fix improper usage of Fileutils#rm_f in ifconfig provider

This also corrects the test that was commented out for some reason
parent dd15a89a
......@@ -199,7 +199,7 @@ class Chef
ifcfg_file = "/etc/sysconfig/network-scripts/ifcfg-#{@new_resource.device}"
if ::File.exist?(ifcfg_file)
converge_by ("delete the #{ifcfg_file}") do
FileUtils.rm_f(ifcfg_file, :verbose => false, :force => true)
FileUtils.rm_f(ifcfg_file, :verbose => false)
end
end
when "debian","ubuntu"
......
......@@ -205,8 +205,8 @@ describe Chef::Provider::Ifconfig do
@provider.stub!(:run_command)
config_filename = "/etc/sysconfig/network-scripts/ifcfg-#{@new_resource.device}"
File.should_receive(:exist?).with(config_filename).and_return(true)
FileUtils.should_receive(:rm_f)#.with(config_filename, :verbose => false, :force => true)
FileUtils.should_receive(:rm_f).with(config_filename, :verbose => false)
@provider.run_action(:delete)
end
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment