Sha256: 6b12d1959a89632f2d1f16ba9d15e01f46b76f5d0052be425d82d592695201d9

Contents?: true

Size: 711 Bytes

Versions: 7

Compression:

Stored size: 711 Bytes

Contents

require 'test_helper'

describe Outpost::ScoutConfig do
  before(:each) do
    @config = Outpost::ScoutConfig.new
  end

  it "should assign options accordingly" do
    @config.options :host => 'localhost'

    assert_equal({:host => 'localhost'}, @config.options)
  end

  it "should assign reports accordingly" do
    @config.report :up, :response_code => 200

    assert_equal({{:response_code => 200} => :up}, @config.reports)
  end

  it "should assign multiple reports" do
    @config.report :up, :response_code => 200
    @config.report :down, :response_code => 404

    assert_equal({
        {:response_code => 200} => :up,
        {:response_code => 404} => :down,
      }, @config.reports)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
outpost-0.2.5 test/outpost/scout_config_test.rb
outpost-0.2.4 test/outpost/scout_config_test.rb
outpost-0.2.3 test/outpost/scout_config_test.rb
outpost-0.2.2 test/outpost/scout_config_test.rb
outpost-0.2.1 test/outpost/scout_config_test.rb
outpost-0.2.0 test/outpost/scout_config_test.rb
outpost-0.1.0 test/outpost/scout_config_test.rb