Sha256: bd46b9067187a9f06330daabc2c8f8255ae3a3ff26886a0cac4dc63c7db5c18f

Contents?: true

Size: 867 Bytes

Versions: 1

Compression:

Stored size: 867 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'
require 'system_metrics/config'

describe SystemMetrics::Config do
  it 'should be valid with instruments, path_exclude_patterns, and a store' do
    config = SystemMetrics::Config.new({:instruments => [Object.new], :store => Object.new})
    config.should be_valid
  end

  it 'should be invalid without instruments' do
    config = SystemMetrics::Config.new({:store => Object.new})
    config.should_not be_valid
  end

  it 'should be invalid without a store' do
    config = SystemMetrics::Config.new({:instruments => [Object.new]})
    config.should_not be_valid
  end

  it 'should be invalid if passed an unrecognized option' do
    config = SystemMetrics::Config.new({:instruments => [Object.new], :path_exclude_patterns => [], :store => Object.new, :bogus => true})
    config.should_not be_valid
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
system-metrics-0.1.0 spec/system_metrics/config_spec.rb