spec/put/support.rb in nagira-0.2.11 vs spec/put/support.rb in nagira-0.2.12
- old
+ new
@@ -36,21 +36,20 @@
before (:each) do
@ret = JSON.parse(last_response.body)
end
subject { @ret }
- #it { subject.}
end
shared_examples_for :write_to_nagios_cmd_file do
before (:all) do
File.delete $nagios[:commands].path rescue nil
end
let (:cmd) { $nagios[:commands].path }
it "writes to nagios.cmd file" do
File.should exist(cmd)
- File.read(cmd).should =~ /^\[\d+\] PROCESS_SERVICE_CHECK_RESULT;#{host}/
+ File.read(cmd).should =~ /^\[\d+\] PROCESS_(SERVICE|HOST)_CHECK_RESULT;#{host}/
end
after (:each) do
File.delete $nagios[:commands].path rescue nil
end