test/integration/instrumentation_test.rb in harness-0.2.4 vs test/integration/instrumentation_test.rb in harness-0.2.5

- old
+ new

@@ -23,6 +23,28 @@ end assert_counter_logged "test-counter" assert_gauge_logged "test-gauge" end + + def test_does_not_log_counter_on_exception + begin + ActiveSupport::Notifications.instrument "counter_test.harness", :counter => true do |args| + raise + end + rescue + end + + refute_counter_logged "counter_test.harness" + end + + def test_does_not_log_gauge_on_exception + begin + ActiveSupport::Notifications.instrument "gauge_test.harness", :gauge => true do |args| + raise + end + rescue + end + + refute_gauge_logged "gauge_test.harness" + end end