spec/lib/plugin_base_spec.rb in zabbix-ruby-client-0.0.20 vs spec/lib/plugin_base_spec.rb in zabbix-ruby-client-0.0.21

- old
+ new

@@ -25,30 +25,30 @@ line = ZabbixRubyClient::PluginBase.getline(@stubfile, "eth0: ") expect(line).to eq @expected_line end it "logs a debug entry when it extracts a line from a file" do - expect(ZabbixRubyClient::Log).to receive(:debug).with("File #{@stubfile}: #{@expected_line}") + expect(ZabbixRubyClient::Log).to receive(:debug).with("File #{@stubfile}: #{@expected_line}") ZabbixRubyClient::PluginBase.getline(@stubfile, "eth0: ") end it "logs a warn entry when a line is not found in a file" do - expect(ZabbixRubyClient::Log).to receive(:warn).with("File #{@stubfile}: pattern \" xxx \" not found.") + expect(ZabbixRubyClient::Log).to receive(:warn).with("File #{@stubfile}: pattern \" xxx \" not found.") x = ZabbixRubyClient::PluginBase.getline(@stubfile, " xxx ") - expect(x).to be_false + expect(x).to be_falsey end it "logs an error entry when a file is not found" do expect(ZabbixRubyClient::Log).to receive(:error).with("File not found: /tmp/xxxxx") x = ZabbixRubyClient::PluginBase.getline("/tmp/xxxxx", " xxx ") - expect(x).to be_false + expect(x).to be_falsey end it "logs an error entry when a file is not readable" do FileUtils.touch "/tmp/xxxxx" FileUtils.chmod 0300, "/tmp/xxxxx" expect(ZabbixRubyClient::Log).to receive(:error).with("File not readable: /tmp/xxxxx") x = ZabbixRubyClient::PluginBase.getline("/tmp/xxxxx", " xxx ") - expect(x).to be_false + expect(x).to be_falsey end -end \ No newline at end of file +end