spec/datadog/notifications/config_spec.rb in datadog-notifications-0.6.7 vs spec/datadog/notifications/config_spec.rb in datadog-notifications-0.7.0

- old
+ new

@@ -1,25 +1,23 @@ require 'spec_helper' describe Datadog::Notifications::Config do it 'is 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(client).to be_instance_of(Datadog::Notifications::Reporter) expect(subject.tags).to eq(['custom:tag', 'env:test', 'host:test.host']) end RSpec.shared_examples 'host tag is not picked up' do |hostname| it 'does not pick up the host tag' do - subject.reporter = Mock::Reporter subject.hostname = hostname subject.tags = ['custom:tag'] client = subject.send(:connect!) - expect(client).to be_instance_of(Mock::Reporter) + expect(client).to be_instance_of(Datadog::Notifications::Reporter) expect(subject.tags).to eq(['custom:tag', 'env:test']) end end include_examples 'host tag is not picked up', false