Sha256: 4234c935e849d82fd1034064864c43ebebba535c3ef6f8453eac7a9055495727

Contents?: true

Size: 583 Bytes

Versions: 8

Compression:

Stored size: 583 Bytes

Contents

require 'test_helper'
require 'metriksd/config'

class ConfigTest < Test::Unit::TestCase
  def setup
    @config = Metriksd::Config.new
  end
  
  def test_broken_config
    assert_raises ArgumentError do
      @config.load(:registry => {})
    end
  end

  def test_working_config
    @config.load :registry => {
      :reporter => {
        :type => 'librato_metrics',
        :email => 'a@b.com',
        :api_key => 'a' * 10
      },
      :server => {
        :type => 'udp',
        :port => 39283
      }  
    }

    @config.start
    @config.stop
    @config.join
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metriksd-0.5.7 test/config_test.rb
metriksd-0.5.6 test/config_test.rb
metriksd-0.5.5 test/config_test.rb
metriksd-0.5.4 test/config_test.rb
metriksd-0.5.3 test/config_test.rb
metriksd-0.5.2 test/config_test.rb
metriksd-0.5.1 test/config_test.rb
metriksd-0.5.0 test/config_test.rb