Sha256: 9112fca788c1be2d1fed536e97228a327b116356e2eeaa766fa35c970c83adfa
Contents?: true
Size: 856 Bytes
Versions: 13
Compression:
Stored size: 856 Bytes
Contents
require 'test_helper' require 'circuitbox/notifier' require 'active_support/notifications' describe Circuitbox::Notifier do it "[notify] sends an ActiveSupport::Notification" do ActiveSupport::Notifications.expects(:instrument).with("circuit_open", circuit: 'yammer:12') Circuitbox::Notifier.new(:yammer, 12).notify(:open) end it "[notify_warning] sends an ActiveSupport::Notification" do ActiveSupport::Notifications.expects(:instrument).with("circuit_warning", { circuit: 'yammer:12', message: 'hello'}) Circuitbox::Notifier.new(:yammer, 12).notify_warning('hello') end it '[gauge] sends an ActiveSupport::Notifier' do ActiveSupport::Notifications.expects(:instrument).with("circuit_gauge", { circuit: 'yammer:12', gauge: 'ratio', value: 12}) Circuitbox::Notifier.new(:yammer, 12).metric_gauge(:ratio, 12) end end
Version data entries
13 entries across 13 versions & 1 rubygems