spec/put/support.rb in nagira-0.5.1 vs spec/put/support.rb in nagira-0.5.2
- old
+ new
@@ -40,20 +40,20 @@
end
shared_examples_for :write_to_nagios_cmd_file do
before (:all) do
- File.delete ::Nagira::Parser.commands.path rescue nil
+ FileUtils.rm_f ::Nagira::Writer.commands.path
end
- let (:cmd) { ::Nagira::Parser.commands.path }
+ let (:cmd) { ::Nagira::Writer.commands.path }
it "writes to nagios.cmd file" do
expect(File).to exist(cmd)
expect(File.read(cmd)).to match(/^\[\d+\] PROCESS_(SERVICE|HOST)_CHECK_RESULT;#{host}/)
end
after (:each) do
- File.delete ::Nagira::Parser.commands.path rescue nil
+ FileUtils.rm_f ::Nagira::Writer.commands.path
end
end
shared_examples_for :put_status do