Sha256: bda01a89e396659f53807182762a07191cb0b8c3ac5cb0a4dfe7ba6aa7f03694

Contents?: true

Size: 644 Bytes

Versions: 8

Compression:

Stored size: 644 Bytes

Contents

require 'spec_helper'

describe Datadog::Notifications::Config do

  it 'should be connect!' do
    subject.reporter = Mock::Reporter
    subject.hostname = "test.host"
    subject.tags = ["custom:tag"]

    client = subject.send(:connect!)
    expect(client).to be_instance_of(Mock::Reporter)
    expect(subject.tags).to eq(["custom:tag", "env:test", "host:test.host"])
  end

  it 'should instantiate plugins on use' do
    subject.use Datadog::Notifications::Plugins::ActionController
    expect(subject.plugins.size).to eq(1)
    expect(subject.plugins.first).to be_instance_of(Datadog::Notifications::Plugins::ActionController)
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
datadog-notifications-0.4.6 spec/datadog/notifications/config_spec.rb
datadog-notifications-0.4.5 spec/datadog/notifications/config_spec.rb
datadog-notifications-0.4.4 spec/datadog/notifications/config_spec.rb
datadog-notifications-0.4.3 spec/datadog/notifications/config_spec.rb
datadog-notifications-0.4.2 spec/datadog/notifications/config_spec.rb
datadog-notifications-0.4.1 spec/datadog/notifications/config_spec.rb
datadog-notifications-0.4.0 spec/datadog/notifications/config_spec.rb
datadog-notifications-0.3.1 spec/datadog/notifications/config_spec.rb