Sha256: b33ade147a49c8de17df84de8ef4b35a2ffe185984f3ed53e4e4e814dc129e9b

Contents?: true

Size: 1016 Bytes

Versions: 5

Compression:

Stored size: 1016 Bytes

Contents

# encoding: utf-8

require 'spec_helper'
require "zabbix-ruby-client"

describe ZabbixRubyClient::Runner do

  before :each do
    @basedir = File.expand_path("../../files", __FILE__)
    Dir.chdir @basedir
    config_file = File.join(@basedir, "config.yml")
    @config = YAML::load_file(config_file)
    task_file = File.join(@basedir, "task.yml")
    @tasks = YAML::load_file(task_file)
  end

  after :each do
    logfile = File.join("logs", "zrc.log")
    File.unlink(logfile) if File.exists?(logfile)
  end

  it "initialize the client object" do
    @zrc = ZabbixRubyClient::Runner.new(@config, @tasks)
    expect(@zrc.instance_variable_get(:@config)['host']).to eq 'localhost'
  end

  it "creates dirs if needed" do
    @zrc = ZabbixRubyClient::Runner.new(@config, @tasks)
    expect(Dir.exists? "logs").to be_true
  end

  pending "loads list of plugins"
  pending "initialize datafile according to config"
  pending "stores data in datafile"
  pending "issues the upload command according to config"

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
zabbix-ruby-client-0.0.20 spec/lib/runner_spec.rb
zabbix-ruby-client-0.0.19 spec/lib/runner_spec.rb
zabbix-ruby-client-0.0.18 spec/lib/runner_spec.rb
zabbix-ruby-client-0.0.17 spec/lib/runner_spec.rb
zabbix-ruby-client-0.0.16 spec/lib/runner_spec.rb